I am trying to integrate bbPress with WordPress, and the only thing in my way (for now) is the sidebar. How do I disable sidebar in bbPress?

I know that one way is to manually remove or comment out <?php get_sidebar)(); ?> in all bbPress template files.

But I would like to know if there a way that will allow me to quickly allow me to turn it on or off — like adding some code in functions.php etc.


  • For quickly turning it on or off do you want some sort of admin checkbox or some conditional logic in the functions.php? Because if it's just to hide it altogether or show it altogether then commenting the code is the fastest way. – sanchothefat Mar 6 '12 at 10:26
  • @sanchothefat Yeah, that's what I have already done. :) – its_me Mar 6 '12 at 11:21

Okay, I manually commented out all instances of <?php get_sidebar)(); ?> in bbPress templates like so:

<?php //get_sidebar)(); ?>

Alternatively, you can simply remove the code as well. But I consider it a bad idea, in case you want to have sidebar in the future.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.