Using custom taxonomies in conditional statements
-
Hi there,
I have created a CPT called ‘Courses’ and have one taxonomy (‘Course Categories’) attached to it. I am trying to create widget areas with custom conditional statements tied to each of two of these categories. Are these not registered in the same way the default WordPress post categories are? The statement I am trying to use is:
“course” == get_post_type() && in_category(“high-school”)It does work with just:
“course” == get_post_type()
however, I can’t get it to recognize any categories.Or, maybe I need to create each category as it’s own taxonomy?
Any help would be greatly appreciated.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Using custom taxonomies in conditional statements’ is closed to new replies.