• I’ve been setting up a site with both a blog and a BBS. Now that WP has support for a static front page, I decided it would be useful for the simple content management that my site requires, and since I’m already using it on my personal blog, there’s zero learning curve. I finally got everything on the blog and PunBB visually consistent, and it all looks marvelous, but I’m running into a roadblock trying to get my WP header to display above the BBS, and preventing me from getting that integrated look that I’m after. I’ve scoured the web for a solution, but the best I could come up with is copying the html and relevant styles from my wp stylesheet to fudge it. This is less than ideal, obviously, because every time I add a page to my site, I have to go in and manually add it in the BBS as well. (I’m using a heavily modified version of the RoundFlow theme, which lists pages as a horizontal navbar.)

    Let me be clear: I don’t know the slightest bit about php. I did find some code that was supposed to help me call the header to a static page, but that didn’t do anything. I tried using the require command with any and all important looking .php files in the WP directory, but still no dice.

    Here’s what I’ve got in the main template of PunBB (main.tpl):

    <body>
    <div class="wpheader">
    <?php
    define('WP_USE_THEMES', TRUE);
    require('../blog/wp-blog-header.php');
    require('../blog/wp-config.php')
    get_header();
    ?>
    <div id="navigation">
    <ul>
    <?php wp_list_pages('sort_column=menu_order&title_li=&depth=1'); ?>
    </ul>
    </div>
    </div>
    <!--End Header-->
    [PunBB-specific stuff]
    </body>

    Is this even possible? It seems like it should be relatively easy, but I’m in way over my head here. Any advice would be much appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • What I had done was.. in my bbPress (forum software) config.php file.. after the <?php

    Added this:

    require_once('/home/yourpath/yourusername/yourdomain.net/blog/wp-blog-header.php');

    Could try the other various methods you’ve mentioned above as well, in your forum software’s config file.. I hope this helps.. if not, maybe someone else around here can help you better..? Good luck

    spencerp

    Thread Starter phreakymonkey

    (@phreakymonkey)

    I don’t quite understand what’s going on with your path there, but I tried it using a direct path, just in case. No dice.

    Failing getting the whole header to be displayed in whole (that’s easy enough to fudge), I would be satisfied if I could just get this single command to work:

    <?php wp_list_pages('sort_column=menu_order&title_li=&depth=1'); ?>

    Oh!! I see what you’re doing.. I missed the “get_header” function you were calling there.. I used the “full-path” for the wp-blog-header.php file.. but, since it’s not working for you.. that can be scratched off the list..

    I’m not familiar at all with PunBB.. but, will one of these articles help maybe?
    https://www.almosteffortless.com/2005/09/25/integrating-wordpress-and-punbb/
    https://www.liewcf.com/blog/archives/2005/04/integrate-punbb-forum-into-wordpress/

    I got those from a google search..
    https://www.google.com/search?hl=en&q=using+WordPress+header+in+punbb&btnG=Search

    I wish I could help more though.. maybe if I had more time, I’d try this myself once.. just so busy lately, don’t have the time really sigh. You’ve probably already read those articles though, but maybe someone else can help you better then..? Good luck with this either way though. ??

    spencerp

    Thread Starter phreakymonkey

    (@phreakymonkey)

    Believe me, I did plenty of googling before I posted here. ?? I’ve read both of them, and both of those tutorials are for duplicating the look of the header, not generating the actual header on the fly, which is what I’m after. It seems like it should be easy enough, but I’m completely baffled.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to call the WP header from PunBB’ is closed to new replies.