Info
- 12 posts
- 7 voices
- Started 4 years ago by Alex123
- Latest reply from samanathon
- This topic is not resolved
Could WP and bbpress share the same template ?
-
- Posted 4 years ago #
Hi,
I was wondering if there is a way to have bbPress uses the style-sheet etc. from the template
I am using for WordPress, in order to have the same look and feel through the entire site.That would be a real integration ;-)
Thanks
Alex -
- Posted 4 years ago #
it is possible. Include the file wp-blog-header.php in the first line (after <?php) of your config.php. So, in every template file that calls bb_get_header() and bb_get_footer() you can replace them with get_header() and get_footer().
In this way you're loading the WP header and footer ... and if you want to include some CSS specifically for bbpress you'll have to do it by means of a WP plugin or editing wordpress' header files.
-
- Posted 4 years ago #
Thank you for your answer. It doesn't sound that difficult.
-
- Posted 4 years ago #
how exactly do you include the blog-header in the config ?
-
- Posted 4 years ago #
If I understood correctly your config.php should look like this:
<?php
<?php get_header(); ?>
// ** MySQL settings ** // -
- Posted 4 years ago #
Correction
<?php get_header();
// ** MySQL settings ** // -
- Posted 4 years ago #
added this as per others instructions, are they the same ?
$bb->WP_BB = true;
require_once( '../wp-blog-header.php' ); -
- Posted 4 years ago #
No. That one looks to be correct, though, but it may need modification depending on the relational positions of your files.
-
- Posted 4 years ago #
It can also be done by making the default bbpress theme look like your wordpress theme. I am almost done doing just that over at yourkahil.com
For the most part everything is the same, only a handful of changes/tweaks to the template files.
-
- Posted 4 years ago #
i figured just to pull in header and footer that way if any theme or navigation modifications are done on WP end it should refelct on the bbpress end too, looking to switch nav bar when user is logged in
-
- Posted 4 years ago #
for some reason this code although works in pulling in WP header/footer i notice that i cannot access the admin, is this the correct code ?
$bb->WP_BB = true;
require_once( '../wp-blog-header.php' );update: ok i worked it out, needed the full path :)
-
- Posted 4 years ago #
There is some great information on this here:
http://bbpress.org/forums/topic/seemless-wordpress-integration -
You must log in to post.