Tax and Term Conditional Statement
-
Hey!
I’ve been reading the Codex docs on this and I cannot figure it out.
I’d like create a condition for a taxonomy and term. The Taxonomy is ‘locations’ and the term is ‘University City’.
Here’s what I’ve come up with but I cannot get it working.
<?php if ( is_tax( 'locations', 'University City' ) ) { echo 'University City'; } else { echo 'Not University City'; } ?>
Here’s the doc I’ve been reading: http://codex.wordpress.org/Function_Reference/is_tax
Any suggestions?
Thanks!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Tax and Term Conditional Statement’ is closed to new replies.