is_tag( 'mild' );
// When the archive page for tag with the slug of 'mild' is being displayed.
is_tag( array( 'sharp', 'mild', 'extreme' ) );
// Returns true when the tag archive being displayed has a slug of either "sharp", "mild", or "extreme".
Does anyone know how to modify the function of WordPress so that it will return true when the tag archive being displayed has the slugs “sharp” and “mild” and “extreme” ?? I need all three slugs to return a true. If there are either of the two slugs, or if there is only one of the slugs, then it returns false.
I would like to know this as well, if I figure it out I will post it. I am after a conditional statement similar to this issue, when I search with ?tag=one+two I want to show something based on either of those, but it only works when it’s the first one used. So is_tag(‘one’) works but is_tag(‘two’) is false unless I re-order them.
Problem is that when you is_tag it only uses the first one. Mine is the same issue, though you want them all (which is easy if it looks at more than the first one) I just want to show something when any of them are a certain tag. I could do it in php, but seems like wordpress is bound to have a way!
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Does WordPress support AND tagging instead of OR?’ is closed to new replies.