How do I use is_tag on a post in WordPress's archive.php -


i want able add particular thing post on blog based on posts tags.

on category pages especially. i'm in archive.php file , want use if (is_tag()) print stuff based on if tag there.

the problem of course not working. i'm assuming because can't use is_tag on non tag pages?

is_tag tells whether page being viewed tag archive page (a page lists posts tag). not function retrieve tags post. use get_the_tags that.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -