Tag Info

Hot answers tagged


You could use the filter term_links-post_tag to sort tags while ignoring their case: add_filter( "term_links-post_tag", 'themeslug_sort_tags_alphabetically' ); function themeslug_sort_tags_alphabetically( $tags ){ natcasesort( $tags ); return $tags; } This code is to be placed in the functions.php of the child theme.


Your cat_n_tag_archives() function is adding pages to all category and tag results indiscriminately. What you probably want (and I am guessing a little) is to restrict that filter to the main query only: function cat_n_tag_archives($wp_query) { if (!$wp_query->is_main_query()) return; // This bit checks for the main query $ary_one = array('post', ...


This solution may work for you also Include custom taxonomy term in search


get_the_tags() uses get_the_terms(): 1265 return apply_filters( 'get_the_tags', get_the_terms( $id, 'post_tag' ) ); Which in turn applies a filter: 1372 $terms = apply_filters( 'get_the_terms', $terms, $post->ID, $taxonomy ); You can use that filter to exclude the term(s) you wish. The answer is effectively the same as for this ...

Only top voted, non community-wiki answers of a minimum length are eligible