Skip Navigation

[Closed] Custom Post Type as child of standard WordPress Page

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 6 replies, has 2 voices.

Last updated by Luo Yang 8 years, 2 months ago.

Assigned support staff: Luo Yang.

Author
Posts
#116774

Hi,

I'm stumped. I'm developing a site that has a number of standard WordPress pages and several CPT's created with Types. I want the CPT's to be children of specific pages. For example:

Impact (WP page)
—Impact Stories (CPT)
Gratitude (WP page)
—Gratitude Stories (CPT)
Get Involved (Wp page)
— Programs (CPT)
— Champions (CPT)
— Partners (CPT)
— Initiatives (CPT)

For each CPT I checked "page-attibutes" in the Display Section and checked "has_archive" in the Advanced Section.

In the page editor of any of my CPT's, the Page Attributes section dropdown appears as expected, but it only lists other pages of that custom post type, not the standard WordPress pages.

I've scoured the forums for help. I've seen other instances where people have achieved this, but I can't get it to work. Any ideas?

Thanks,
Eric

#116977

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Hi Eric,

Please try your child CPT, set it as a child post of post type "page".
The "Parent Page" is a wordpress buildin feature only for post type "page".

More help:
Creating Post Type Relationships
https://toolset.com/documentation/user-guides/creating-post-type-relationships/

#117091

Thanks, but I don't fully understand your reply.

Are you saying that in the settings for my CPT I need to select Post Relationship > Children > Page? I tried that. I've tried both Children:Page and Parent:Page. In both cases, I can see a dropdown box in the editor for Attributes, but I don't see any of my standard WordPress pages there; only custom post types.

Maybe what you're saying is that it's not possible to put a CPT as child of a standard WordPress page.

I read the Creating Post Type Relationships page yesterday, and unless I completely missed it, I didn't see any information about what I'm trying to do. It appears that these parent/child relationships can only be applied to custom post types. Is that correct? If so, can you offer a suggestion as to how to create the page structure I detailed above?

Thanks,
Eric

p.s. I realize there's a time difference; not sure what part of the world you folks are in. Can you tell me what hours support questions are generally answered?

#117282

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

For example, structure:
Impact (WP page)
—Impact Stories (CPT)

You can create a CPT Impact Stories with Types, set it as a child CPT of a page CPT
Then when you edit a Impact Stories (CPT) post, you will find a field table where you can choose parent page, set it as Impact

parent/child relationships can be applied to CPT and wordpress build-in post types "post" & "page".

I am in GMT+8 area

#117287
Screen Shot 2013-07-23 at 8.34.53 PM.png

Maybe I'm doing something wrong still.

In my CPT called Impact Stories, under the Post Relationship section, for "Children" I checked the "Page" box. Is that correct?

Next I open one of the Impact Story posts, I see the Fields Table, but no dropdown menu to select the built-in WordPress page called "Impact" that I created. I want the Impact Story posts to be children of the Impact page. You say that it's possible to create parent/child relationships among Types CPTs and built-in WordPress posts and pages, but I can't figure it out...

The URL structure I'm trying to achieve is this:

domain.com/impact/impact-story/title-of-story <- singular
domain.com/impact/impact-stories/ <- archive

Again, the Impact page is a built-in wordpress page. How do I assign it as the parent of all Impact Story posts?

I'm attaching a screen grab of the Fields Table.

Thanks for you patience.

#118412

Still need help on this... It's been a couple days since my reply to you and now the weekend is here. I have a deadline approaching. I'd really appreciate a reply. Is it possible to make posts from my CPT be children of a built-in wordpress page? I haven't found documentation detailing this exactly.

Please let me know how to proceed.

Thanks,
Eric

#121479

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Eric, Sorry for the delay answer, from your mentioned above, I think you need set CPT "Impact Stories" as a child CPT of pages,
So when you edit the CPT "Impact Stories" in Types-> Custom Post Types and Taxonomies
edit "Impact Stories", in section "Post Relationship",
"Parent" enable the checkbox of "page".

Then when you edit a "Impact Stories" post, the field table of parent "page" dropdown menu will display, it will display when the "Impact Stories" post is saved.

The topic ‘[Closed] Custom Post Type as child of standard WordPress Page’ is closed to new replies.