Skip to:
Content
Pages
Categories
Search
Top
Bottom

Full Width bbPress – A Simple Solution


  • csk
    Participant

    @syndicate

    This post is to help people quickly remove sidebars in bbPress.

    Here are the steps:

    1. Download: Replace Text

    This is a simple program that lets you batch edit documents.

    2. Take all of the files from: /bbpress/bbp-themes/bbp-twentyten (http://imgur.com/XSWtH) and save them to your computer.

    3. Drag these files into Replace Text and replace: get_sidebar with //get_sidebar. All you’re doing is commenting out the sidebar. There should be about one change per file.

    Upload these changed files and you should be good to go. You will have to do this again after upgrading but it only takes a few minutes.

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

  • John James Jacoby
    Keymaster

    @johnjamesjacoby

    Thanks for the suggestion, but this is actually a really poor way to go this.

    Never modify bbPress core files.

    Instead, copy them from bbp-twentyten/bbpress and place them in a /bbpress folder in a child theme of your current theme. Then, modify the new copies.

    If you want to get rid of the sidebar completely, then make a copy of bbp-twentyten in your /themes folder, remane the theme to something else, and start hacking the same way as above.

    Again; Never modify bbPress core files.


    csk
    Participant

    @syndicate

    Cool.. I just learned about Child themes. Now I feel like a noob.. but thanks for clearing that up.


    csk
    Participant

    @syndicate

    Crap.. you’re smart. Thanks for the fast reply too.

    • This reply was modified 11 years, 8 months ago by csk.

    rene-michaels
    Member

    @rene-michaels

    JJJ,

    Is it not possible to copy the “bbp-theme-compat” theme, removing the sidebars there, and then uploading it as a child theme? I like the default style and just want to remove the sidebars without reworking the entire “bbp-twentyten” CSS.

    If so, how/where would I tweak bbp-theme-compat theme to remove the sidebars?

    Seems to me removing sidebars should be an option in the bbPress admin no?


    pimarts
    Participant

    @pimarts

    I posted this in another topic, this works for me:

    function disable_all_widgets( $sidebars_widgets ) {       
        if ( function_exists('is_bbpress') ) {
            if (is_bbpress()) {
                $sidebars_widgets = array(false);
                remove_all_actions('bp_register_widgets');
                unregister_sidebar( 'bp_core_widgets' );
            }
        }
        return $sidebars_widgets;
    }
    
    add_filter('sidebars_widgets', 'disable_all_widgets', 1, 1);
    

    But that’s because I haven’t looked into custom themes yet. Did everything with functions and CSS at the moment.


    Nate
    Participant

    @caming

    pimarts,

    if that’s the case, that must be the easiest solution yet — but where does it go, exactly? I’ve placed it in the bbpress childtheme with no luck. is it in the core?

    thanks!


    Lynq
    Participant

    @lynq

    @pimarts
    If you have a sidebar container does that function remove that aswell or just the widgets inside it?


    pimarts
    Participant

    @pimarts

    Ok, a litle more info:

    I run a bbPress + BuddyPress installation. And I put that function in the functions.php file of my WordPress theme.

    It would remove the widgets inside. If needed you could remove the rest of the / entire sidebar with CSS. The advantage over a simple CSS hide is the fact that less code gets written to the browser / less code to download for the user.

    Aside from that I use it to put the login widget at the top of the forums (with CSS) and remove all the other widgets.


    Kzr-Data
    Participant

    @kzr-data

    @pimarts
    I used your solution to hide my widgets but it seems it only works when I’m logged.
    Do you have more info or another solution to make it work when unlogged?
    I will use the css solution for the moment.

    Thanks

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.
Skip to toolbar