I have created a page template to call a custom sidebar for bbpress. It works great on the archive-forum.php page, but when I put the same code on the single-forum.php or single-topic.php page I am getting a “Oh bother! No forums were found here!” message where the sidebar should be.
My sidebar is called sidebar-bbpressside.php. I am calling it with the following code:
Any thoughts how I can get that working on the sub-pages too? Weird.
Sounds like something in your sidebar is calling query_posts() or some other query that’s nooping your main query loop. Or, your sidebar is being included before the main content, and manipulating the main query.
Either way, you’ll probably have better luck making a bbpress.php template in the root of your theme, and including your sidebar there. That way it’s done in one shot, without needing to manipulate a bunch of template files.