Using bbpress functions from the wordpress theme
-
Hi all
After upgrading:
WP2.5 -> 2.7
BBPress 0.9.4 -> 1.0 alpha 6
WP is running badly.
In order to get access to functions of BBPress, I have these lines at the end of wp-config.php:
if ( !defined('BBDB_NAME') )
require_once(ABSPATH.'forum/bb-load.php');
Into the index.php of my WP theme, I wish to display the last topics of the forums, by doing:
<?php
$forums = get_forums();
$topics = get_latest_topics();
$super_stickies = get_sticky_topics();
for ($i=0;$i<3;$i++){
$topic = $topics[$i];
?>
" title="See the message of <?php topic_author();?>"><?php topic_title();
<?php } ?>
The display of the latest messages was working well and still working well after the upgrade, BUT WORDPRESS GETS INTO TROUBLE:
– the css style for the back admin of WP is not working
– the hooks into the plugins are not called anymore (add_action(‘wp_head’, ‘init_js’); where init_js() is never run)
– custom query vars are not detected into the url
Well, when I remove the require_once into the wp-config.php (see below), the trouble disappear.
//if ( !defined('BBDB_NAME') )
//require_once(ABSPATH.'forum/bb-load.php');
How to get it working with the bbpress function without trouble in WP ?
I think this is a very important point for the BBPress integration in WordPress
Thanks
- You must be logged in to reply to this topic.