is_category()
is the wrong function to use here. That category is checking Are we on the archive page for the given category?
The correct function to use would be has_category()
, which is checking Is this post in the given category?
is_category()
is the wrong function to use here. That category is checking Are we on the archive page for the given category?
The correct function to use would be has_category()
, which is checking Is this post in the given category?