Get terms from multiple taxonomies

If you want to retrieve multiple taxonomies you need to put the four taxonomies in an array, you are doing this, but you have put taxonomy=> in the array. $terms = get_terms( ‘taxonomy’ => array( ‘vehicle_safely_features’, ‘vehicle_exterior_features’, ‘vehicle_interior_features’, ‘vehicle_extras’) ); Hope it helps

How to add a style to taxonomy edit page

You can do it like this: add_action (‘admin_enqueue_scripts’, ‘wpse_style_tax’) ; function wpse_style_tax () { // these 3 globals are set during execution of {edit-tags,term}.php global $pagenow, $typenow, $taxnow ; if (!in_array ($pagenow, array (‘edit-tags.php’, ‘term.php’)) { return ; } if (‘news’ != $typenow) { return ; } if (‘news-category’ != $taxnow) { return ; } … Read more

Exclude Child Term Posts from Parent Term Archive

Okay, I’ve found an answer. Part of the issue was the missing array @goto10 mentioned, and the other part was that tax_query has required arguments. Here’s what I’m using so far: function exclude_children($wp_query) { if ( isset ( $wp_query->query_vars[‘custom_taxomony’] ) ) { $wp_query->set(‘tax_query’, array( array ( ‘taxonomy’ => ‘custom_taxonomy’, ‘field’ => ‘slug’, ‘terms’ => $wp_query->query_vars[‘custom_taxonomy’], … Read more

Custom hierarchal taxonomy loses interface hierarchy when selecting parent & children

This seems to be normal, it also happens for categories. The wp_terms_checklist(), which creates the checklist, has an argument checked_ontop, enabled by default. The metabox does not override this, so checked categories or custom terms always appear on top of the list. This does not affect their actual hierarchy, only how they are displayed there. … Read more

How to enable hierarchical permalinks for hierarchical taxonomies

This is implemented in WordPress now as of 3.1. When you register your taxonomy, make sure to set rewrite hierarchical to true as well as the taxonomy itself: <?php register_taxonomy(‘genre’,array(‘book’), array( ‘hierarchical’ => true, // this makes it hierarchical in the UI ‘labels’ => $labels, ‘show_ui’ => true, ‘query_var’ => true, ‘rewrite’ => array( ‘hierarchical’ … Read more