Best practices for adding a sidebar to bbPress
-
I’m working on my first bbPress theme and I am going to have two columns on most pages. I will likely vary the content of this second column depend on which page you are on.
I’d like to use a separate sidebar just like WordPress so that I can create a few different files that I could load.
These sidebars need not draw any content from WordPress, I don’t need deep integration or anything. I’m just wondering what would be the best way to go about doing this.
Theme Playground’s bbPress forum has it’s sidebar added to the footer.php file, which sounds like a good idea, but seems a bit impractical for multiple sidebars.
I also found this simple sidebar plugin in the forums which adds the “bb_get_sidebar()” function to bbPress. A neat idea, but I hate to frivolously add extra plugins, especially when it is essential for the theme to work properly.
So what I have done in my theme is to simply use an include like this:
<?php include ('sidebar.php'); ?>This has been working fine for me and I don’t see any reason not to do it like this.
But does anyone else have a different method that has some advantage? Or is there plans for, or already an official function like “bb_get_sidebar()” that I am unaware of?
You must be logged in to reply to this topic.