Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › check if posts are in custom taxonomy › Reply To: check if posts are in custom taxonomy
March 2, 2023 at 5:30 pm
#41606
Keymaster
But the problem is, that posts can’t have taxonomies – posts can only have terms from custom taxonomies associated to them.
Taxonomies are the “group” for terms, for example categories are part of a taxonomy called “categories” etc..
If you want to check if the post is in a specific category, then use the has_term() function. With this you can check if a post is within a specific category or any other taxonomy term.