0

I created a custom post type in functions.php with these values (amongst others):

'hierarchical'        => true,
'supports'            => array( 'title', 'thumbnail', 'revisions', 'page-attributes'),
'capability_type'     => 'page',

I understood this should be the bits needed to get page attributes to offer parent page as a dropdown to make it a child of another page, however all that shows in page attributes is Order with a number box. Have I missed something to get this working? I assume also that if this was working my custom content-type page would be available to choose as the homepage in Settings/Reading ?

3
  • Yes, these arguments should be all that you need to have the ability to select a parent CPT. Did you change anything after you initially registered the CPT? WP is bad about settings changes after a CPT is registered once, so you might try unregister_post_type('slug') right above your call to register_post_type('slug') and see if that fixes things.
    – WebElaine
    Mar 4, 2020 at 16:02
  • Just for sanity have you resaved permalinks backend? Mar 4, 2020 at 16:10
  • Hi both - just tried both those things, no joy. I tried unregister_post_type on its own first to check that worked, the post_type vanished, the re-registered it, and updated permalinks - still doesn't offer page parent in properties. For one of these post-types I could get round the parent issue, but I need to be able to select one of them as homepage.
    – iain-g
    Mar 4, 2020 at 16:47

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.