hierarchical post_types — can someone explain?
-
I posted in the How-to & Troubleshooting forum a few days ago and didn’t get a response, but I think I have some fairly complex ideas floating around and either I don’t know the right verbage to use to ask the right questions or I really don’t understand what I want. ??
I hope someone can explain hierarchical post_types to me — how they are connected in the DB, for example — and how to set them up in the functions.php.
I mean, the examples of post_types I found in the Codex all set hierarchy to false, and I know there is a built in function to check if a post_type is hierarchical, but I’ve found nothing to explain what happens when you set one to true and how to create a parent-child relationship between them.
I’m not certain post_types can work like this, so please correct me if I’m wrong. I would like a parent type and three child types. The parent type is a website bookmark post_type while the other three are really add-ons. The child types would “inherit” the parent type info, meaning that the parent type post is only stored once but any time any of them are queried, the parent + the child queried is returned. That’s my logic, anyway. I just don’t know how to set it up, if I’m even right.
bookmark (parent) – title, article author, (custom field), url (custom field), summary (post body), poster (post author), tags
review – reviewer (post author), review (post body), tags, comments
favorite – list owner (post author), notes (post body), tags
to-read – list owner (post author), notes (post body), tags
I am using the latest versions of WordPress, BuddyPress, Gravity Forms (though I haven’t quite figured that out either) and Suffusion as you can see at https://j2-spn.exit-23.net.
If anyone can explain how to make this work, I would be extremely grateful. Thank you in advance!
J
- The topic ‘hierarchical post_types — can someone explain?’ is closed to new replies.