Forums

[resolved] Custom Post Type : hierarchical doesn't work (4 posts)

  1. TimPetricola
    Member
    Posted 6 months ago #

    Hi,

    I need to add a portfolio custom post type and this one has to be hierarchical.
    Unfortunately, the box to choose the parent does not appear in the admin.

    There is my code to declare the custom post type: Code on pastbin

    I tried to call the function is_post_type_hierarchical('portfolio') and that returns true ...

    So, the problem seems to come from the administration.

    Thanks for your help :)

  2. keesiemeijer
    moderator
    Posted 6 months ago #

    Try changing this:

    'supports' => array('title','editor','thumbnail'),

    to this:

    'supports' => array('title','editor','thumbnail','page-attributes'),
  3. TimPetricola
    Member
    Posted 6 months ago #

    Works perfectly!

    Thank you keesiemeijer :)

  4. keesiemeijer
    moderator
    Posted 6 months ago #

    No problem. Glad you got it resolved.

Reply

You must log in to post.

About this Topic