Need Help Removing Sidebar
-
I was able to successfully get bbPress installed: http://brewreview.com/forums but it’s pulling in the sidebar from my blog. Inside of a topic, it then pushes the sidebar down below the forum: http://brewreview.com/forum/general/beer-talk. Is there an easy way to just remove the sidebar?
-
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!
Is this the proper approach? removing all of the php
get_sidebar()
function calls?Now you’re not even trying: https://bbpress.org/forums/topic/full-width-bbpress-a-simple-solution/
🙂
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!
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. 🙂
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.
Worth a shot!
- This reply was modified 12 years, 4 months ago by Lynq.
Meh, just ignore my last post I can’t get it working.
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);
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()Thank you, nguyenkinh, that worked for me 🙂
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.
- You must be logged in to reply to this topic.