I have a custom post type, called articles
. I’ve also created a taxonomy called subject
. Each article has a subject, just like posts have categories.
Now to the problem. When I’m on the page-articles.php
(page-slug.php
), it has to check which subject the article has. How can I do that?! I’ve been surfin’ the web for days without finding any solution.
What I’m thinking is that in some way I have to check the taxonomy subject if it matches a criteria. Like:
if (is_term('news', 'subject'){
// do this
}
But I really can’t figure out how it works! The is_term
doesn’t do that, and I can’t find any other function either.