Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of Hugo

How to disable WP sidebar from all buddypress pages (7 posts)

Started 1 year, 10 months ago by: caplain

  • Profile picture of caplain caplain said 1 year, 10 months ago:

    Is it possible to exclude my WordPress sidebar from ALL buddypress pages? I’m using my WP theme via the buddypress template pack.

  • Profile picture of Paul Gibbs Paul Gibbs said 1 year, 10 months ago:

    Around where you include your sidebar.php, try something like this: http://buddypress.pastebin.com/1KeQHxEx

  • Profile picture of caplain caplain said 1 year, 10 months ago:

    I tried your solution in page.php

    if (bp_is_blog_page()) {
    get_sidebar();
    }

    My sidebar still appeared on all BP pages.

  • Profile picture of caplain caplain said 1 year, 10 months ago:

    I discovered the problem: I’m using a widgetized theme, so dynamic_sidebar() is being used. Now I have to figure out where that is called to see if I can wrap that in a ‘if(bp_is_blog_page()){}’…

  • Profile picture of caplain caplain said 1 year, 10 months ago:

    Resolved. My solution (in sidebar.php) has been amended to http://buddypress.pastebin.com/tkUDryN3

    Thanks for pointing me in the right direction.

  • Profile picture of David Z David Z said 1 year, 10 months ago:

    @caplain that worked like a charm for me, too. I run two sidebars and wrapped that to disable one of them on the bp pages. thanks!

  • Profile picture of katemgilbert katemgilbert said 1 year ago:

    You can also use the Widget Logic plugin with the conditional statements listed here: http://wordpress.org/support/topic/buddypress-and-widget-logic.

    The easiest way to enact this is to exclude all component groups.