• Jess

    (@jcull76)


    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/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Chris Dillon

    (@cdillon27)

    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. 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

    (@jcull76)

    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.