Deep integration of bbPress with WordPress

wordpress-bbpress-integration

I have written tutorials to simple integrate bbPress with WordPress but Deep integration tends to take it to the next step.

To know more about deep integration, read my upcoming post (to be published tomorrow).

Before we can deep integrate bbPress with WordPress, we need to simple integrate it. You can follow the bbPress WordPress integration tutorial and then complete the following step.

Add the following line of code in the beginning of bb-config.php file

/* 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");
}

In line 4, specify the path to the wordpress file. Like here in sample code, it is for bbPress being in a sub-folder of WordPress. Make sure it matches your setup.

This will load the WordPress along with bbPress and now WordPress based function calls and code can be used inside bbPress. This tutorial just enables you to use WordPress within bbPress from the development point of view. For more information on how you can use deep integration further stay tuned so that you don’t miss any of them.


Comments

13 responses to “Deep integration of bbPress with WordPress”

  1. mheidzir Avatar
    mheidzir

    bro, u need to fix “amp&” into “&” character in the code

    1. Thanks for the heads up! Fixed! 🙂

  2. Frank Avatar
    Frank

    Hi
    I’ve added the code but get a ‘Web Page has Redirect Loop’ and no load 🙁

  3. Rajesh Avatar
    Rajesh

    Hi,
    Thanks a lot. I was trying to deep integrate BBpress with WordPress in vain for a long time. Now your fix has fixed my problem.
    Rajesh

    1. good to hear that 🙂

  4. hi thanks for deep integration stuff. i have done simple one but after i am having prob to add following

    /* 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”);
    }

    1. Don’t post your config file anywhere publicly. That contains your database details.

  5. Jamie Recker Avatar
    Jamie Recker

    When I try to get it to work I get that there is an error on line 4, as I installed BBpress on a directory under wordpress (KaoTech.co.uk is wordpress)
    (KaoTech.co.uk/Forum is BBpress) what would the linking code be? since you need to link to wp-load, and your code confuses me (sorry!)

    I’m new to this so sorry in advance!

    1. Jamie Recker Avatar
      Jamie Recker

      Sorry to double post, but I’ve fixed most errors (using the original wordpress code) But apparently I’m now getting a line 5 syntax error, even though its directly copied from them?

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

  6. @Jamie @Shakeel

    I myself copy the code from here whenever I do an integration. Try clicking one of the four buttons that appear when you hover over the code and then copying it from the text window.

  7. Just wanted to say thanks for the information you’ve provided here and on the bbpress forums. It was invaluable to getting the deep integration to work.

    I’m not sure if you’ve covered this in other areas but a couple of wp plug-ins that gave me some difficulty during this process were “WP Super Cache” and “Theme My Login.” Both are excellent plugins but they need to be deactivated during install. This may common knowledge to most but it did trip me up so I thought I’d mention it.

    Again – thanks!

    1. Hi Mick,

      You are welcome! 🙂
      Some plugins can create problems, I know. WP Super Cache were sometimes mentioned to be working by caching even their forum pages & sometimes, that it doesn’t work. Whole Deep integration is not officially supported and is just a hackery deal.