Skip to content
Advertisement

How can I check if a TERM is assigned with a POST using two parameters term slug and post ID?

I need to check whether a post has been assigned with a term but I do not have information about the taxonomy of that term as it could be any taxonomy present in my site.

Advertisement

Answer

You can have a custom function to return terms for all taxonomies:

JavaScript

Then use it like:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement