How can I hide tags on a child-category page, if that tag has not been used?

Yay, thanks to the help of a co-worker, I now have a solution to this 🙂 Tertiary navigation for the tags (templates/nav-tags.php): // only load tags from the current page $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; $args = array( ‘post_type’ => ‘easy_steps’, ‘paged’ => $paged, ‘category__in’ => ($cat), ); $second_query = new WP_Query( $args … Read more

How to display products name in a non-alphabetical order, in a custom field (taxonomy)?

[SOLVED] This do the Job: function set_the_terms_in_order ( $terms, $id, $taxonomy ) { $terms = wp_cache_get( $id, “{$taxonomy}_relationships_sorted” ); if ( false === $terms ) { $terms = wp_get_object_terms( $id, $taxonomy, array( ‘orderby’ => ‘term_order’ ) ); wp_cache_add($id, $terms, $taxonomy . ‘_relationships_sorted’); } return $terms; } add_filter( ‘get_the_terms’, ‘set_the_terms_in_order’ , 10, 4 ); function do_the_terms_in_order … Read more

Taxonomy Tag Conditionals

If you want to use an entirely different template, you could filter 404_template and check query vars for a specific taxonomy: function wpa83050_404_template( $template=”” ){ global $wp_query; if( isset( $wp_query->query_vars[‘product_cat’] ) ) $template = locate_template( array( “product_taxonomy-no.php”, $template ), false ); return $template; } add_filter( ‘404_template’, ‘wpa83050_404_template’ ); You could also just put logic similar … Read more

How to save a multiple checkbox array into a non-hierarchical taxonomy

First in checkbox value use taxonomy id not the name of taxonomy. For save more than one taxonomy relation related to a post in wp_term_relationship table use $theme = $_POST[‘specialities’]; wp_set_object_terms( $post_id, $theme, ‘activity_category’ ); “wp_set_object_terms” will save checked taxonomy value to “wp_term_relationship” table with post id.