It looks like that from some of your customization you have removed some of the ‘wrapper’ bbPress classes from your templates eg. this will indeed change the layout and sidebar issues you are seeing.
Thank you, I just remove the line where sidebar on all files, but the right column still appears: (
Got another question. How does bbPress weigh the different templates? For example, if I put a bbpress.php in my child theme root, with the sidebar removed, all pages in the forum misses the sidebar.
However, if I put archive-forum.php in the child theme root, with a removed sidebar, that sidebar pops up on all the other pages.
In what order does bbPress look for templates in version 2.1?
I have about the same problem as you. I know one way to remove it though, but unfortunately it’s time consuming.
Go into “/plugins/bbpress/bbp-theme-compat/extras” and copy all templates into “themes/my-child-theme/” root folder. After that I have to go into every single template and remove the line with “get_sidebar();”
Is there any easier way to get rid of that sidebar?
Hello,
I’m using bbPress plugin with WordPress. But the problem is whenever I post a new topic or reply on forum, it shows up on recent post widget on my blog sidebar. I would like to know if there’s a way to stop this.
http://tjosm.com/
Thanks!
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.
@pimarts
If you have a sidebar container does that function remove that aswell or just the widgets inside it?
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.
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?
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);
Once i can’t remove sidebar too but i have solve this problem thanks for your advise.
…i mean full width
http://pvpelite.de/forum/ here’s my page.
When you’re clicking on a link in the forums, the sidebar will appear again
Hi guys,
can you tell me how to remove the sidebar only at the forums?
I’m using my own theme (not bbpress theme).
I tried to create a new site with “full site, no sidebars” template but it do not work.
thanks
sorry about my bad english
No it is not fixed. I was messing with a couple templates to REMOVE the sidebar completely. The single topic view still has it:
http://www.v-fit.us/forums/topic/phase-1-week-2/
You can see it is below the whole thing.
I don’t know if this is of any help but to get what I did at SWNK (http://www.swnk.org/forums/) I added the following code to my functions.php:
function disable_all_widgets( $sidebars_widgets ) {
// if ( bbp_is_forum() ) {
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);
Then I added some CSS to put the login widget above the forum.
Problem: Remove sidebar from bbPress
Solution: My theme has a Full Width option
I know that if I input my shortcode into a Page, it will display the forum in the Template of my choosing. Presto, the forum index is within Full Width.
Yet when the user decides to choose a forum, they’re relegated to the Theme’s default Template, which includes the sidebar.
Meeeeh.
Is there a quick and dirty way to tell bbPress to use the Full Width template that’s already available?
The modifications in step 3 and 5 depend on your theme/layout.
In step 3 I made css modifications to “theme” the forum colors mostly. These modifications are unique to each site. I just use firefox to inspect elements then locate that element in the bbpress.css file and change it to how I want it to look.
In step 5 I modified page.php to remove the sidebar. Again this is specific to your site however this is how my page.php looks
Code:
<?php get_header(); ?>
<!– BEGIN MAIN WRAPPER –>
<div id=”main-wrapper”>
<!– BEGIN MAIN –>
<div id=”main3″>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<!– BEGIN POST –>
<div id=”post”>
<h3 class=”section-title”><?php the_title(); ?></h3>
<div class=”post-entry”>
<?php the_content(); ?>
<?php wp_link_pages(‘before=<span class=”page-links”>Pages: &after=</span>’); ?>
</div>
</div>
<!– END POST –>
<?php endwhile; endif; ?>
</div>
<!– END MAIN –>
</div>
<?php get_footer(); ?>
OK I think I see what you’re saying. So WP would continue to use the page.php template to render BBP pages like forums and topics, but we can branch the logic in that page using the BBP template tags.
Just tried this and it works.
In case it helps anyone else, the way to remove the sidebar from BBP topic pages would be using something like this in your page.php file:
<?php if(!bbp_is_single_topic()) { get_sidebar(); }; ?>
Thanks guys!
@martin_style: Not quite sure what you mean by “once time load slow, but not loading multiple times”
@jaredatch: How do I nuke the sidebar?
I lied. I am not using
.bbp-forum #primary {
display: none;
}
I am using a plugin that replaces primary sidebar with a bbpress specific sidebar.
But I have 2 sidebars, and I am hiding the 2nd sidebar with CSS
.bbp-forum #secondary {
display: none;
}
So this is the one that I need to remove.
I am guessing that instead of fiddling with the Theme, it might be easier to patch the plugin. Here’s what it does at the moment:
function vp_sidebars_widgets($data)
{
// if bbpress enabled and main sidebar requested
if ($this->is_bbp && $this->is_main_sidebar)
{
// switch sidebar if bbrepss sidebar has some widgets in it
if (!empty($data[$this->sidebar_id]))
{
if (isset($data['sidebar-1']))
{
// uses sidebar-1 as main sidebar in most themes
// set forum sidebar as main sidebar
$main_sidebar_key = 'sidebar-1';
}
else
{
// get first sidebar which should be main in most themes
foreach ($data as $k => $v)
{
if (strpos($k,'inactive')===false)
{
$main_sidebar_key = $k;
break;
}
}
}
// replace main sidebar with bbpress sidebar
if (isset($main_sidebar_key))
{
$data[$main_sidebar_key] = $data[$this->sidebar_id];
}
}
// reset main sidebar request
$this->is_main_sidebar = false;
}
// return modified widgets array
return $data;
}
First of all sorry for bumping so often.
I’m using the suffusion v4.0.4 theme as I mentioned above. I use wordpress version 3.3.1 along with bbpress 2.0.2 and buddypress 1.5.5.
First I removed the <?php get_sidebar()?> from bbpress .php files, then in the style.css i added the proper components for the forum to be full width (i hope you get it), it was working fine.
But then I went into the sidebar.php in the suffusion theme folder (i was just trying something) and when I went to the forum page the other widgets were gone, but the new one was standing right next to the forum container .. I think this happened after I upgraded buddypress.
Then I tried to remove the bbpress plugin along with all his files, then again i re-installed bbpress, and done the same thing as before, but now all widgets are shown, not just only one. X_X
Here’s the link to the forum http://www.poker.mk/forum/forum/