How to set parent-child relationship between differents custom post types

I have just set up a post/parent relationship between a post type “episodes” and a post type “cartoon-series.” I used this bit of code to add in the meta box to assign the parent from another post type: add_action(‘admin_menu’, function() { remove_meta_box(‘pageparentdiv’, ‘episodes’, ‘normal’); }); add_action(‘add_meta_boxes’, function() { add_meta_box(‘episodes-parent’, ‘Cartoon Series’, ‘episodes_attributes_meta_box’, ‘episodes’, ‘side’, ‘default’); … Read more

get_posts assigned to a specific custom taxonomy term, and not the term’s children

Say I have the following taxonomy terms: Term 1 Term 1.1 Term 1.2 Term 2 Term 2.1 How can I get only posts that are assigned to Term 1 and not include those that are assigned to Term 1.1 or Term 1.2? For example: $pages = get_posts(array( ‘post_type’ => ‘page’, ‘numberposts’ => -1, ‘tax_query’ => … Read more

The Difference Between Hierarchical and Non-Hierarchical Taxonomies?

The question is “What is the Difference Between Hierarchical and Non-Hierarchical Taxonomies?” This question really stumped me at first so I figured it would be a good idea to show the difference to others surfing the site looking for the distinction. Specifically the question is referring to the hierarchical argument passed to the register_taxonomy() function. … Read more

How to create a permalink structure with custom taxonomies and custom post types like base-name/parent-tax/child-tax/custom-post-type-name

I’ve been combing this site and google for the answer and I’ve come up completely empty. Basically I want to do exactly what this post asks, but I need a hierarchical taxonomy. The answer given in that post works great, but only with a single level taxonomy. Is it possible to do what I want? … Read more