Title: [Plugin: Widget Logic] Taxonomy woes
Last modified: August 19, 2016

---

# [Plugin: Widget Logic] Taxonomy woes

 *  [deadhippo](https://wordpress.org/support/users/deadhippo/)
 * (@deadhippo)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/plugin-widget-logic-taxonomy-woes/)
 * I tried using this :
 * > A Registered Taxonomy
   >  is_taxonomy() ( deprecated in 3.0 in favor of taxonomy_exists())
   > When a particular taxonomy is registered via register_taxonomy().
 * to get a widget to show only on posts of a certain taxanomy but it didn’t seem
   to work.
 * I tried both
 * is_taxonomy(‘color’,’black’)
    taxonomy_exists(‘color’,’black’).
 * The widgets displayed on every page.
 * Any ideas?
 * [http://wordpress.org/extend/plugins/widget-logic/](http://wordpress.org/extend/plugins/widget-logic/)

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

 *  [bluebird2](https://wordpress.org/support/users/bluebird2/)
 * (@bluebird2)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-widget-logic-taxonomy-woes/#post-1589812)
 * I think you need to use this:
    `is_post_type_hierarchical($post_type)` Returns
   true if this $post_type has been set with hierarchical support when registered.`
   is_post_type_hierarchical('book')` Returns true if the book post type was registered
   as having support for hierarchical.
 *  [alanft](https://wordpress.org/support/users/alanft/)
 * (@alanft)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-widget-logic-taxonomy-woes/#post-1589818)
 * having just looked into this, I think you need something like
 * get_post_type()==’book’
 * see: [http://codex.wordpress.org/Conditional_Tags#A_Post_Type](http://codex.wordpress.org/Conditional_Tags#A_Post_Type)

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

The topic ‘[Plugin: Widget Logic] Taxonomy woes’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/widget-logic_c8dde5.svg)
 * [Widget Logic](https://wordpress.org/plugins/widget-logic/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/widget-logic/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/widget-logic/)
 * [Active Topics](https://wordpress.org/support/plugin/widget-logic/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/widget-logic/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/widget-logic/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [alanft](https://wordpress.org/support/users/alanft/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-widget-logic-taxonomy-woes/#post-1589818)
 * Status: not resolved