1

After creating a custom post type like below, I still dont get any option to set the parent of the post, am I missing something?

register_post_type(
  'projects',
  array(
    'labels' => array(
      'name' => 'Projects',
      'singular_name' => 'Project'
    ),
    'public' => true,
    'capability_type' => 'post',
    'supports' => array('title', 'editor', 'thumbnail', 'excerpt', 'comments'),
    'hierarchical' => true,
    'menu_position' => 5
  )
);

1 Answer 1

3

Try adding 'page-attributes' to the supports flags: 'supports' => array(..., 'page-attributes').

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.