WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to be able to add posts to a post parent in wordpress. Is there a way? There is such option for pages but I need it for posts to. Any ideeas?


share|improve this question
up vote 1 down vote accepted

Posts & Pages are "built in" Custom Post Types. So something that was delivered as a pre-configuration when WP was installed. There's also other built in stuff like Tags & Categories which are basically nothing other than custom taxonomies.

And you're lucky: You can simply use the API and add your own, hierarchical custom "post" type.

register_post_type( 'hierarchical' => true );
share|improve this answer
Very interesting, ty. That's it, I just need to paste this line inside my functions .php? – webmasters Aug 27 '11 at 20:34
No, you need to follow the link and assign those values that don't have defaults. Then you need to add this to your functions.php file. And then you have to query for your new post type instead for the default built in post types. This means modifying the template files of your theme. – kaiser Aug 27 '11 at 20:56

Posts are designed to be chronological. Pages hierarchical. If you are trying to make posts hierarchical, you are using WordPress all wrong. Custom post-types are your solution but it's not a walk in the park...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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