Title: When a Post has Multiple Categories
Last modified: August 21, 2016

---

# When a Post has Multiple Categories

 *  [Jess](https://wordpress.org/support/users/jcull76/)
 * (@jcull76)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/when-a-post-has-multiple-categories/)
 * I’m using this plugin to show sub-menus in the sidebar widget area for different
   pages and categories of my site. However, some of my posts have multiple categories,
   which means multiple menus showing up in the sidebar.
 * Is there any way to make it so that NONE of the widgets show up on a single post
   page when the post has more than one category? Any help is much appreciated.
 * [https://wordpress.org/plugins/display-widgets/](https://wordpress.org/plugins/display-widgets/)

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

 *  [Chris Dillon](https://wordpress.org/support/users/cdillon27/)
 * (@cdillon27)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/when-a-post-has-multiple-categories/#post-4785175)
 * The plugin does not contain that sort of multiple condition logic.
 * But you can mimic it by adding another widget control plugin like [Widget Context](http://wordpress.org/plugins/widget-context/).
   It’s not ideal but I’ve seen worse workarounds. Use Display Widgets to show and
   Widget Context to hide, or vice versa. It may take some trial and error to find
   the right combination and you may have to use the specific page ID/URL settings
   in the plugin.
 * I think what you’re asking for is a unique case that you won’t find in an off-
   the-shelf plugin.
 *  Thread Starter [Jess](https://wordpress.org/support/users/jcull76/)
 * (@jcull76)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/when-a-post-has-multiple-categories/#post-4785198)
 * What I’m looking for is code to do this:
 * IF this is a single post page
    AND post has multiple categories THEN don’t show
   any widgets
 * I don’t know if I need to add that to this plugin, or to my sidebar in general.
   And I don’t know how to write that particular function.

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

The topic ‘When a Post has Multiple Categories’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/display-widgets_f8f8f8.svg)
 * [Display Widgets](https://wordpress.org/plugins/display-widgets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/display-widgets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/display-widgets/)
 * [Active Topics](https://wordpress.org/support/plugin/display-widgets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/display-widgets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/display-widgets/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Jess](https://wordpress.org/support/users/jcull76/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/when-a-post-has-multiple-categories/#post-4785198)
 * Status: not resolved