Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

The usual set-up: www.domain.com - wordpress installation with sidebars and widgets; www.domain.com/forum - bbpress. BBpress is integrated via bbpress-integration plugin. The question is - how can I assign one sidebar with it's widgets to appear on bbpress' sidebar and be fully functional? Widgets contain contents of wordpress. It would be very tedious to write these specific widgets as custom functions to be inserted in bbpress.

share|improve this question

3 Answers 3

You can create an iframe and inside that one you load a template file that contains the sidebar you want to introduce only. Then you can trigger that one in the context of the homepage probably. The only thing left is to fake the request pattern, which can be achieved by overriding variables early, e.g. within a plugin. That plugin could overload the theme as well, but I'm unsure if that really makes sense. Depends a bit on your WP themes structure.

share|improve this answer

You can try deep integration with which you load the whole WordPress on bbPress side, and then can use WordPress specific functions. You can use an existing sidebar on bbPress side or even create a new one specific to the forums and use that. Theoretically everything should work but the mileage may vary. As per my experience, you are very less likely to have any issues and will be fine but this adds a good amount of load on forums side as WordPress core is also loaded along with bbPress core.

/* Deep integration */
if ( !defined('ABSPATH') & !defined('XMLRPC_REQUEST')) {
define('WP_USE_THEMES', false);
include_once(dirname(__FILE__) . '/../wp-blog-header.php' );
header("HTTP/1.1 200 OK");
header("Status: 200 All rosy");
}

One done, just use WordPress functions in your bbPress theme to build up anything that you want with WP codebase. Eg: <?php get_sidebar(); ?> or <?php get_sidebar('forums'); ?> although define a sidebar by that name too.

You can get some more bbPress related resources & advantage/disadvantages of using deep integration on this page - http://blog.ashfame.com/bbpress/

share|improve this answer

Now, you can use the bbPress Plugin, which is currently in beta-release.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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