Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Suggestions and misc

Now .. ive managed to make WP and bbp share same theme. Dont know if its god but it works.. im running right now.

wp-content/theme/header.php

<?php
include(ROOT . '/theme/header-start.php');
?>
<title><?php bloginfo('name'); ?> - <?php if ( is_single() ) { ?> &raquo; Archive <?php } ?> <?php wp_title(); ?></title>
<?php
wp_head();
include(ROOT . '/theme/header-end.php');
?>
<body>
<?php
wp_head();
include(ROOT. '/theme/body-start.php');
?>

my-themes/theme/header.php

<?php
include(ROOT . '/theme/header-start.php');
?>
<title>MyWebsite - <?php bb_title() ?></title>
<?php
bb_feed_head();

if ( is_topic() && bb_is_user_logged_in() ) : ?>
<script type="text/javascript">
var lastMod = <?php topic_time( 'timestamp' ); ?>;
var page = <?php global $page; echo $page; ?>;
var currentUserId = <?php bb_current_user_info( 'id' ); ?>;
var topicId = <?php topic_id(); ?>;
var uriBase = '<?php bb_option('uri'); ?>';
var tagLinkBase = '<?php bb_tag_link_base(); ?>';
var favoritesLink = '<?php favorites_link(); ?>';
var isFav = <?php if ( false === $is_fav = is_user_favorite( bb_get_current_user_info( 'id' ) ) ) echo "'no'"; else echo $is_fav; ?>;
</script>
<?php
bb_enqueue_script('topic');
endif;

bb_head();
include(ROOT. '/theme/header-end.php');
?>
<body id="<?php bb_location(); ?>">
<?php
include(ROOT . '/theme/body-start.php');
if ( is_bb_profile() ) profile_menu();
?>

my-themes/theme/footer.php

<?php
do_action('bb_foot', '');
include(ROOT . '/theme/body-end.php');
?>

wp-content/theme/footer.php

<?php
include(ROOT . '/theme/body-end.php');
?>

theme/header-start.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head profile="http://gmpg.org/xfn/11">

theme/header-end.php

<link rel="stylesheet" href="<?php echo URL; ?>/theme/default.css" type="text/css" title="Default style" media="screen" />
<link rel="alternate" href="<?php echo URL; ?>/?feed=rss2" type="application/rss+xml" title="RSS Feed" />
<link rel="pingback" href="<?php echo URL; ?>/xmlrpc.php" />
<link rel="EditURI" href="<?php echo URL; ?>/xmlrpc.php?rsd" type="application/rsd+xml" title="RSD" />
<link rel="wlwmanifest" href="<?php echo URL; ?>/wp-includes/wlwmanifest.xml" type="application/wlwmanifest+xml" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="generator" content="WordPress 2.3.1" />
</head>

theme/body-start.php

<div id="wrapper">
<?php
get_sidebar();
// Etc...
?>

theme/body-end.php

<?php
// Etc...
wp_footer();
?>
</div>
</body>
</html>

Hope its all there.. ;)

URL and ROOT is defined in wp-config.php

Edit: you can of course cut BODY to include different sidebar wp / bbp :)

Skip to toolbar