• Mark

    (@markjcasey)


    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

Viewing 16 replies (of 16 total)
  • Thread Starter Mark

    (@markjcasey)

    It works! Amazing. I’ve been messing with this for ages.

    Thanks for you help, much appreciated.

Viewing 16 replies (of 16 total)
  • The topic ‘Target posts that only have 1 specific tag’ is closed to new replies.