Skip to:
Content
Pages
Categories
Search
Top
Bottom

Integrating WP Menu in my bbPress template


  • TonyVitabile
    Member

    @tonyvitabile

    Hi folks. I’m pretty new to WordPress — I’ve only been working with it for about a month. And brand new to bbPress–I just installed it last week

    I’ve got a theme installed on my WordPress MU site that I like. I want the bbPress pages to look similar. So I’m in the process of editing the bbPress template. Basically I want to use the same style sheet & just change all of the id tags to the ones that are in the stylesheet.

    In addition, though, I’d like the two sites to share menus. I’ve got a nice horizontal dropdown menu that came with my theme that I’m using. The menu contains the pages in my WordPress blog.

    I’ve duplicated the code for the menu in my bb-press theme’s header.php, but there is no wp_list_pages function in bbPress. Should I just write a function & add it to a functions.php file for my template? I suppose I can steal some of the wordpress code for the function & just modify the variables as necessary.

    Does this sound like a good approach, or has someone else done this?

    Also, I want the menu in both systems to have links to individual forums. Having a Forums link in the menu is cool, but I want 2 specific forums in other places in the menu structure. Any ideas?

    Thanks

    Tony

Viewing 9 replies - 1 through 9 (of 9 total)

  • Rohan Kapoor
    Member

    @rohan_kapoor

    Yes. The Idea is called Deep Integration. You’re looking for something like this: http://wpmu.zyrot.com/ and then http://wpmu.zyrot.com/forums/ right?

    If so, I will help you, please email me at rohan@rohan-kapoor.com


    TonyVitabile
    Member

    @tonyvitabile

    Thanks. I’ve been reading a little about deep integration & I’m not sure I want the overhead. This is a new site with only about 45 pages or so of static content, to date, and the amount of content will grow over time. Getting bbPress to load WordPress, too, sounds like it will slow everything down, especially as content grows.

    As the pages are all contained in the database, and bbPress is already storing its data in the same database as WordPress, I was just looking for a function that would work like wp_list_pages() only using bbPress variables.

    I guess I’m going to have to go spelunking through the WordPress & bbPress code.

    Tony


    TonyVitabile
    Member

    @tonyvitabile

    I have written a function I call bb_list_pages() and I’ve added it & some support code to a functions.php file in my bbPress theme’s folder. This does NOT work using the WordPress wp_list_pages() logic. Rather, it attempts to output the same results as that function. There are things that wp_list_pages() does that this function can’t do, but it works for my site. If folks are interested, I’ll post the functions.php file after I finish getting it debugged.

    I just have one question. How can I determine what the current page’s URI is? I need this to highlight the page on the menu.

    Thanks

    Tony


    Rohan Kapoor
    Member

    @rohan_kapoor

    I’m sorry mate but deep integration doesn’t slow anything down. It is really the best way to get it working. Email me: rohan [at] rohan-kapoor.com I can work with you over msn or something.


    chrishajer
    Participant

    @chrishajer

    > I’m sorry mate but deep integration doesn’t slow anything down.

    I think there would be many here who disagree with you. What sort of empirical evidence do you have that it does NOT slow anything down? Loading all of WordPress has to take some amount of time.

    http://bbpress.org/documentation/integration-with-wordpress/#func

    Doing this will add quite a lot of weight to your bbPress installation as it will cause WordPress to load in it’s entirety. Your best option is to try to emulate the functionality you require inside a bbPress plugin.

    Tony did this the right way to get the functionality he needed.


    Rohan Kapoor
    Member

    @rohan_kapoor

    It may say that yes but how slow is wordpress is loading anyways? If you are on a site that already has wordpress installed you may as well load it on the forums just for the benefits that it had.


    Ashfame
    Participant

    @ashfame

    Both the scripts will be loaded on each page call. That’s surely an overhead one would wanna avoid.


    Rohan Kapoor
    Member

    @rohan_kapoor

    I would disagree. I haven’t seen any problems in many sites that are using this, including my own. For now, I think it really is a matter of personal opinion.


    TonyVitabile
    Member

    @tonyvitabile

    I’ve been busy this weekend with church related activities & I didn’t get back to this post until now. I’ve also found the answer to my own question about getting the current page’s URI.

    I still have a problem to lick in that my WordPress theme came with a horizontal drop down navigation bar that works in WordPress. I included that code in the header.php & the styles from the original stylesheet for the theme, but nothing is dropping down on the bbPress side. The theme uses a JavaScript file to handle the drop-down logic that I’m including on the bbPress side, so I don’t get it. When I look at the WordPress output side by side to the output of my function, it’s identical. So it has to be something in the CSS. I think.

    Anyhow, I’m going to mark this resolved. Thanks folks

    Tony

Viewing 9 replies - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.