This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Widget Area Assignment: Custom

  • Creator
    Topic
  • #25958
    kennethfeldman
    Participant

    Hi Jason,

    (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?

    Your Examples:
    is_home()
    is_home() || is_single()
    “book” == get_post_type() || is_tax(“author”)

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.