0

I'm needing to check a variable and if the slug doesn't match a custom taxonomy's category slug run a function. I can't wrap my head around what I would need to do in order to get the "categories" of a custom taxonomy in an array and check them against a value.

All help is greatly appreciated.

0

You must use get_terms in order to obtain all the "categories" of a custom taxonomy.

http://codex.wordpress.org/Function_Reference/get_terms

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.