Support » Fixing WordPress » No Widget, but Sidebar won't go away

  • I’ve had this issue through multiple versions and multiple themes. It has happened on the left and the right sidebar, so it has to be a simple setting somewhere, right?

    If I have no widget active in the sidebar, it doesn’t go away. Instead, it displays widgets that aren’t active. For example, right now my right sidebar is showing Recent Posts, Blogroll (from my Links list) and Meta. But none of these are active, and they don’t show on my Widgets page. If I activate a widget in the right sidebar, the other items go away.

    I have 2 active widgets on the left sidebar. If I deactivate or move them, three others show up. Categories, Posts by month, and then some sample widget text.

    The site, if it helps, is

    Appreciate any help I could get. I’m trying to avoid poking around in the code, so I’m hoping it’s an easy fix.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Check sidebar.php
    Your coder had called them if you are not using any widget.

    As stated above, the ‘default’ widgets are shown if none are manually added by yourself. And if you remove them, the defaults will re-appear.

    I’m not sure what you are trying to do exactly. Remove a sidebar permanently, or only when no widgets are actively added by yourself?

    If so you will almost certainly need to edit your sidebar.php file and do a little customization.

    Thanks for the notes.

    @dgwyer, I’d prefer to hide that sidebar if no active widgets are in there.

    Any hint that could be shared on what to change in the code would be welcomed.

    Basically you need to wrap the output code in your sidebar so that if no widgets are defined (added by you) then no sidebar div’s get rendered.

    A useful function for doing this is is_active_sidebar(), you can read more about this here:

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘No Widget, but Sidebar won't go away’ is closed to new replies.