Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

Ty!

share|improve this question
add comment

2 Answers

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
add comment

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
add comment

Your Answer

 
discard

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.