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 register a custom post type as child of another custom post type. I have 2 questions--

  1. hierarchical' => true should be added on the parent or child when register?
  2. Codex says "Allows Parent to be specified", how?
share|improve this question
add comment

2 Answers 2

"Allows Parent to be specified" means that the post type behaves more like pages than posts.

What you are trying to achieve is not possible with core functions, but there's a plugin wich does almost the same.

I recommend you the powerful Posts 2 Posts plugin by WordPress Core Contributor scribu. It allows you to create connections between different post types and has lots of configuration possibilities. The screenshots and the documentation can give you an impression if it's right for your task.

share|improve this answer
    
Nice plugin, but a bit too heavy for me and I need to do a lot more specific tasks for my needs between the connections. Anyway, I'm going to study this plugin to get some ideas. Thanks! –  Jenny Feb 23 '12 at 11:42
add comment

"Allows Parent to be specified" means that you can allow its child post types to call this post type their parent. This means you need to add

'hierarchical' => true

every time in the args of parent Post Type when you need children.

Look at this for making a 'Post Type' a child of another.

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.