• Resolved besweeet

    (@besweeet)


    I have a CPT. Let’s call it “CustomType” for this example. It has an archive page at testsite.com/CustomType/.

    I’d like to create a new page that falls under the “CustomType” permalink called “TestPage” so that it can be accessed at testsite.com/CustomType/TestPage/. If I manually add “CustomType/” to the page’s permalink, WordPress automatically changes it to a dash so that the final URL will be testsite.com/CustomType-TestPage/.

    The pod has “hierarchical” enabled yet “CustomType” isn’t available as a parent page.

    Any ideas?

    • This topic was modified 6 years, 3 months ago by besweeet.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Jim True

    (@jimtrue)

    Pages aren’t children to post-types. Posts within those post-types are ‘children’ of that post type. So if your archive for your Custom Post Type is ‘CustomType’ and you have a post within ‘CustomType’ of ‘TestPage’, then yes, you could view it at <yourURL>/CustomType/TestPage/

    It won’t be a WordPress ‘page’, it will be a post of the CustomType post-type. That’s how rewrite rules and post types work. If you go hierarchical, it would add the ‘child’ of the ‘TestPage’ post underneath that, like Pages does, but you’ll still have the leading /CustomType/ leading URL.

    I hope that helps and sorry to have missed this post. For some reason it wasn’t showing up in UnResolved.

    Thread Starter besweeet

    (@besweeet)

    Based on that, the only way to achieve what I’m hoping to do is create a post within ‘CustomType’ called ‘TestPage’ then rewrite the permalink with a plugin.

    Or (since I use Elementor), create a ‘CustomType’ archive as a page first, leave the general permalink structure the same and then since there is now an archive page, I should be able to make a new page within ‘CustomType’.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Create page with CPT as parent?’ is closed to new replies.