is_category()
does this:
(…) Checks if a Category archive page is being displayed. (…)
One line below on the codex page you find:
To test if a post is in a category use
in_category()
.
So just use the latter.
is_category()
does this:
(…) Checks if a Category archive page is being displayed. (…)
One line below on the codex page you find:
To test if a post is in a category use
in_category()
.
So just use the latter.