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

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

Conditional tag in Widget Logic for checking if top level page or if subpage

You can find the answer on the plugin’s page at wordpress.org. Select the tab ‘Other Notes’. You will find it at the example list: global $post; // WP page that is a child of page 77 return in_array(77, get_post_ancestors($post)); Edit: As an alternative to your suggestions you may try global $post; return !empty(get_post_ancestors($post)); This is … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)