• Big fan of this plugin! I found a solutions, so I’m posting here.

    I was having trouble defining a widget that I only wanted to show up on certain CPT taxonomy pages. Custom post type of ‘books’ with a taxonomy of ‘awards’. Each of the awards pages needed different widget content.

    found this: is_tax( 'flavor', 'mild')

    As is fairly normal with wordpress codex it wasn’t explained well but when I paid attention to the content I *got* it. think of it this way…

    is_tax('taxonomy_name', 'taxonomy_term')

    In my case: is_tax( 'awards', 'moms-choice-award')

    Voilá!

    Once again, Widget Logic has saved my bacon! Probably time to make another donation, been a couple years.

    http://wordpress.org/extend/plugins/widget-logic/

Viewing 4 replies - 1 through 4 (of 4 total)
  • How can I use this plug in on other category, instead of original wordpress. Because at my site http://www.keyrealestate.com.kh. I have a Property Categories, such as Phnom Penh, Siem Reap and so on. So how can I use widget logic to show on these specific categories?

    *This is not a default WordPress Template.

    Thanks

    Thanks you so much, I’ve tried it and it work really well. Thankssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss.

    I’ve been searching around for weeks. You are my hero.

    what about excluding a custom content type? i tried a few version of this and could not get it to work…

    Thread Starter valerama

    (@valerama)

    You can hide the widget if the terms are NOT matched by using the exclamation point before the function, i.e.,

    !is_tax('taxonomy_name', 'taxonomy_term')

    If you need to hide it for multiple terms, in that second declaration (where it says ‘taxonomy_term’) you could put an array:

    !is_tax('taxonomy_name', 'array('first_taxonomy_term','second_taxonomy_term','third_taxonomy_term')')

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Widget Logic & Custom Post Types’ is closed to new replies.