Add the parameter hierarchical
to the array with value true
. This will allow you to create child posts on your CPT.
Source:
https://developer.wordpress.org/reference/functions/register_post_type/#parameters
Related Posts:
- TV Show database – Best way for structuring it?
- Share parent path between Custom Post Types and Pages?
- Conflict between wp_list_pages and get_posts – list pages not displaying
- How do I disable the built-in editor and automatically configure the properties of new pages?
- Displaying posts inside table having issues
- One Post with different content, depending on a Page
- Child Theme problems
- Searching multiple custom post types and pages
- Correctly delete posts with meta and attachments [duplicate]
- Why are the comments disabled by default on my custom_post_types?
- Linking Two Post Types
- Custom Post Types on Category Pages
- Creating “static” taxonomies to choose from, inside custom post type?
- How do I filter the excerpt metabox description in admin?
- Setting up custom post type archives in WP3.1? Any luck?
- Best Way to Create a List of Musician Gigs in WordPress
- Create child page within custom post type
- Custom Post Type Permalink For Parent/Child, 404 Page Not Found Error
- Add custom field to media attachment image attribute in post editor
- Why is the »_builtin« parameter not advised in »register_post_type()« for custom post types?
- Removing Image Sizes for Custom Post Type
- Display posts of custom type in hierarchical order
- Query posts by custom post type and custom taxonomy
- Custom Post Type Name Causing Problem
- Query in a Hierarchical Custom Post Type for Children vs Siblings
- Storing Custom Post Type Data in a Custom Table
- Get the post children count of a post
- Custom post type hierarchical permalinks not behaving as expected for parent/child pages
- Sub-Sub-Blogs — creating and importing content into a custom sub-type
- removing custom tax & CPT slug, adding taxonomy term in front of custom type
- Show Two custom Post type and their posts on category page
- Can I make WordPress use a custom template for a child page
- Custom post type and body_class: Remove “blog” class
- Setting posts per page in query_posts
- How to insert content from another Custom Post type into Post?
- Create custom PAGE with register_post_type
- Is there a way to have the view link on manage posts page to open in a new window or tab?
- How i can add ‘N’ page of ‘N’ pages under posts loop?
- Page vs Custom Post Types Differences/Issues
- How to Mass Delete Images from Media Library
- List custom taxonomy specific to one custom post type
- How to allow visitors to enter custom post type?
- Exclude pages in archives results
- Make parts of your wordpress website completely built with data from external APIs?
- Hide parent categories when clicked, and show it’s childs
- Assign same parrent Page to pages AND custom post types
- Versioned Custom Post Type (Not the same as revisions)
- Custom post Type, child of a Page?
- Static page determines as home, but it is not
- What code should I use to display children of a custom post?
- Top Level pages in wordpress giving 404, but child pages working fine
- Best structure / rewrite rules to achieve the following url
- Why is get_pages() returning a boolean?
- Redirect page to default subpage
- 404 Error on form submission within custom post type
- the_content(); of custom post type treated as an array or object
- Remove Quick edit for custom post type?
- How can I have different content for different countries?
- Displaying multiple post types on home page
- Query to get child pages of current page and display it in action hook
- Display custom post type for specific user
- URL Rewrite – Page Archive
- How to export custom post type with ACF to individual file with automation?
- Different videos for different posts
- Add Class according to the order of appearance
- $wpdb is queried but results don’t show
- Post visibility option to theme front-end for author to select?
- Custom taxonomy not saving correctly
- Is there a (preferable built-in) way to check what custom queries are used in a theme?
- Can I get an auto-populated dropdown list of other custom posts in a custom post edit page?
- WordPress next post by ajax call on button click
- Remove plugin settings from post creation page for a user role
- Custom Post Type Single Page and Archive Page redirects to Home Page
- How can I fetch all the dates from custom fields from various different custom post types and show / list them at one place in ascending order?
- Disable Sidebar on certain pages
- Adding specific custom fields (images) to post excerpt
- Show posts from custom post type sorted by category/taxonomy on a one-pager/page
- My post loop needs to have 8 different post templates
- Automatic Set Category For A Custom Post Type
- Publish metabox postition?
- Display a list of sub-pages of Custom Post Type Parent Page
- I have a problem with displaying children pages of custom post type
- Permanent Custom Post Type
- Creating Slider in wordpress theme with custom post
- Cannot use pages created on WP
- Different post types arranged on one page
- Pulling Content from Existing Database
- Custom post type child page 404
- Sort by Custom Post Type (Multiple Loop)
- Selecting which pages to display custom post type on using checkbox
- Display all post types together
- Displaying information from Custom Fields in template with Types?
- 2 language CPT content
- Is There A Way To Add Another Field To Custom Post Type (Not Custom Field/Meta)?
- How to store queried custom data and use it in multiple pages?
- Highlight specific menu item when custom post is page
- Exposing custom fields to the user in custom type post
- show posts under custom post type with same autj
- How to automate the creation of advanced layout article/post
- Sort CPT by taxonomy AND THEN by custom field