(FYI: I’m using Custom Post Type UI plugin to create custom post types and taxonomies)
Trying to assign sidebar widget areas to display on custom_post_type posts.
Specifically, I have a custom post type called “video”, and a taxonomy called “style”. Then, there are two types of “style”; there’s Yoga (yoga) and Aerial Play & Fitness (aerial-play-fitness).
I want to use the Custom Widget Area Assignment to load different widget/sidebars for each of both of my taxonomies (yoga, and aerial-play-fitness).
I cant seem to get this right by using your guides (at bottom) as examples.
In plain english, my logics needed are:
1) load this widget area if the post_type is video AND if the taxonomy style equals yoga
2) load this widget area if the post_type is video AND if the taxonomy style equals aerial-play-fitness
WHEN I use this: “video” == get_post_type() it works to limit the sidebar to ONLY “video” posts.
But I can’t seem to further filter down to either my “aerial-play-fitness” or “yoga” ‘styles.’
I tried THESE and they don’t work quite right:
“video” == get_post_type() && is_tax(“yoga”)
“video” == get_post_type() && is_tax(“style”, “aerial-play-fitness”)
“video” == get_post_type() && is_tax(style, aerial-play-fitness)
I FEEL LIKE I’m close?
is_home() || is_single()
“book” == get_post_type() || is_tax(“author”)
- You must be logged in to reply to this topic.