Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 119568

valerama on "Widget Logic & Custom Post Types"

$
0
0

You can hide the widget if the terms are NOT matched by using the exclamation point before the function, i.e.,

!is_tax('taxonomy_name', 'taxonomy_term')

If you need to hide it for multiple terms, in that second declaration (where it says 'taxonomy_term') you could put an array:

!is_tax('taxonomy_name', 'array('first_taxonomy_term','second_taxonomy_term','third_taxonomy_term')')


Viewing all articles
Browse latest Browse all 119568

Trending Articles