Is there a way to check if a single post is attached to a particular taxonomy
-
I want to create a condition whereby if a post is attached to a particular taxonomy then some additional code is executed on a modified single.php but I can’t find a way to directly check for the taxonomy.
I thought “is_tax” might do the job but it seems that this tag is only effective for archive pages, which I assume means a page that is generated from a template using the taxonomy name.Is there a direct way to read the taxonomy from a single post so that I can do something similar to:
if (is_tax('chapter')) {additional code}
Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Is there a way to check if a single post is attached to a particular taxonomy’ is closed to new replies.