Skip to:
Content
Pages
Categories
Search
Top
Bottom

Need Help Removing Sidebar

Viewing 14 replies - 1 through 14 (of 14 total)
  • i’m trying to do the same thing right now. looks like you’re going to have to search through each PHP file in the bbPress theme and remove the following code:

    <?php get_sidebar)(); ?>

    it’s the only way that i can think of… which is neither fast nor easy. :(

    WR!

    as a quick addendum, i didn’t actually delete the code. i just commented out the PHP contents, like so:

    <?php //get_sidebar(); ?>

    that was if something changes and i still need the sidebar, i’ll know where they all were to begin with. :)

    WR!

    It’s also worth noting that you need to make sure and create your own bbP theme if you are going to modify it.

    If you edit the core theme that is inside the bbPress plugin directory you will lose all your customizations next time you update.

    having accomplished this, see if you can figure out how to have the content expand to full width ONLY in the forum… lol.

    WR!


    Clay
    Member

    @clayheaton

    Is this the proper approach? removing all of the php get_sidebar() function calls?


    John James Jacoby
    Keymaster

    @johnjamesjacoby


    Lynq
    Participant

    @lynq

    I found it easier just to do it by CSS.

    All of the bbPress pages will put a class of .bbPress on the body tag.
    My sidebar is #primary.

    So what I did was this small bit of css:

    .bbPress #primary {
    display: none;
    }
    

    Then I added in some extra CSS to extend the width, easy!


    Clay
    Member

    @clayheaton

    Oops. Yeah, I saw that other thread earlier, but this is the one that turned up when I searched. For the record, “Globally Disable Sidebar?” would be a great option in the bbPress settings. 🙂


    Lynq
    Participant

    @lynq

    I think the difficult part about sidebars is knowing what the sidebar is called or what ID it is.

    You could probably add this into your functions file if you know the id of the sidebar you want to hide, I haven’t tested it though.

    http://pastebin.com/pvbQ8nuK

    Worth a shot!

    • This reply was modified 12 years, 4 months ago by Lynq.

    Lynq
    Participant

    @lynq

    Meh, just ignore my last post I can’t get it working.


    pimarts
    Participant

    @pimarts

    You could try something like this (for an install that also has BuddyPress):

    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);
    

    Verra
    Participant

    @nguyenkinh

    Hi, funny thing is I currently want to add sidebar for my bbpress forum plugin. It alway shows the wordpress sidebar!

    Anyway, to remove sidebar use the fullwidth forum like this: http://www.ytecongcong.com/forums/
    Just follow
    1. Clone page.php of your WP themes and rename it to forum.php
    2. use BP Tweaks WP plugins to choose forum instead of page as default
    3. Open forum.php, remove the php code content php get_sidebar()

    • This reply was modified 12 years ago by Verra.
    • This reply was modified 12 years ago by Verra. Reason: SOLVE

    mariepizzer
    Participant

    @mariepizzer

    Thank you, nguyenkinh, that worked for me 🙂


    abugabby
    Participant

    @abugabby

    I followed nguyenkinh’s logic, but instead I copied the full width page in my template and renamed it forum.php. It worked like a charm.

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