New answers tagged hierarchical
You can get all of the parents of an object via get_ancestors - $term_id = 42; $your_taxonomy = 'sometax'; $parents = get_ancestors( $term_id, $your_taxonomy );
There is of course the include_children parameter for WP_Query as part of the taxonomy parameters. Which I suppose should work like this for you: $args = array( 'tax_query' => array( array( 'include_children' => false ), ), ); $query = new WP_Query( $args ); Or via parse_tax_query for your category archive: ...
Those of us who have developed static websites with pages will understand the problem as Pieter has outlined in the comments above. Essentially if one could create a page and list content on that page one has the desired effect but it is useful to use the category system in wp to manage content and order it. Here is what I've done and have working: I ...
Maybe echoing the last query will help debug the problem. Paste this on your 404 page: global $wpdb; echo "<pre>"; var_dump($wpdb->last_query); die();
Top 50 recent answers are included