Hi,
thanks for your answer. Unfortunately, it doesn’t work for me.
Id doesn’t recognize the tag.
Can you try changing is_tag
with has_tag
?
Perhaps the tag added was wrong? You can add in the tag’s slug to be sure.
Please refer to this documentation on how to use this particular function to get a better idea on what to put in it:
https://developer.wordpress.org/reference/functions/has_tag/
Note: The particular snippet only works for tags, if you want it applied for categories as well, you’ll have to add in_category()
condition.
A wise man once said:
"Have you cleared your cache?"