Widget Logic & Custom Post Types
-
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.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Widget Logic & Custom Post Types’ is closed to new replies.