Target posts that only have 1 specific tag
-
Hi
I’m using
if (has_tag('tag-name')
to target posts that have a certain tag (amongst other tags).I’d like to do something different on posts that are only tagged with that specific tag though and have no other tags. At the moment, the above code includes these posts, obviously.
So is it possible to target post with only 1 specific tag? Could you count the tags and then check if it’s the specific tag I want to target?
Thanks
- The topic ‘Target posts that only have 1 specific tag’ is closed to new replies.