Skip to:

Widgets Dissapear

  • simonwillan


    BuddyPress version: 1.9.2
    Wordpress version: 3.8.1

    Hi everyone. I am new to setting up BuddyPress and am having issues with the widgets in one of my sidebars. I have 2 calls to get_sidebar(), one asking for “left” and one asking for “right”.

    The problem is the right sidebar has widgets in it, and so I have the code:

    is_active_sidebar( 'primary-widget-area' );

    This tells me whether to display my primary widgets or not. The page is the “Activity Streams” page and when deactivated it works fine. As soon as I activate it, the widgets vanish.

    I have var_dump()’ed the result of is_active_sidebar() in page.php and I get false every time.

    Why on earth is it disabling my primary widgets and does anyone know how to override this behaviour?


Viewing 4 replies - 1 through 4 (of 4 total)
  • When what is deactivated or how deactivated?

    BP theme compatibility will use page.php by default unless you overide that behaviour and as such will show it’s content within that page structure so your get_sidebars() calls should be unaffected.

    You don’t really go into much detail about the theme your using and it’s setup which does help to understand what’s happening.



    Many apologies, When I set the “Activity Streams” Page in BP settings to “None” (deactivate, should have been clearer on that), then I get my sidebar back. When I set “Activity Streams” to one of my existing pages, I can see the Activity Stream just fine, but the widgets in the sidebar no longer display, and is_active_sidebar() is returning FALSE.

    I use BP theme compatibility because I am not using an existing WordPress template. It is completely bespoke. I don’t override the default behaviour as I am happy with it using page.php for now.

    However I may have just seen my problem. I am using a plugin called “WordPress Page Widgets” which lets me specify a different set of widgets on a per page basis. If I apply the sidebar widgets to every page the default way it works fine. However it is incredibly important that each page has a different set of widgets, and WordPress doesn’t appear to have a way of doing this without the need for a plugin.

    Any thoughts?



    okay so it has “register_sidebar()”, I can use that. My problem is related to the fact that I’m using widgets to display a Sub Menu that can be defined using the Menus admin. I can then choose the menu to display, and the widget will display it. That menu needs to change on a per page basis. (hence the need for a different set of widgets per page)

    It’s a difficult one to help with, would need to see how this plugin links page selected widgets to page sidebar/page id. You’re going to have to trace back and try and find where this plugin stumbles, which I know isn’t much help really.

    There’s probably an alternative one could take coding things from scratch, but again to be able to suggest what goes slightly beyond what’s possible on a forum and needs detailed look at things.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Widgets Dissapear’ is closed to new replies.
Skip to toolbar