Skip to:
Content
Pages
Categories
Search
Top
Bottom

Can't get proper bbPress sidebar to display with my custom there


  • cdonahue
    Participant

    @cdonahue

    Hello, I’ve installed bbPress (v.2.5.3) to my custom WordPress website (v.3.8) and it picked up the theme perfectly. However, I can’t get the bbPress sidebar to display. It seems that even though my Forum page (which I’m calling Community) is a WP page, it behaves like something else. Here’s what I’ve done:

    — Created a new template for my forum page (community.php);
    — Selected that template from the community page per the WP interface;
    — Created a new sidebar by registering it in functions.php;
    — Moved the bbPress widgets over into my newly created sidebar;
    — Called the sidebar from community.php

    My community page is defaulting to the main sidebar, or page sidebar, even though I have selected a completely different template for the page. I also tried going with the default page and using bbPress Tweaks but that did not work.

    I think I’m missing something about how the forum page works. Any ideas?
    Here’s how the page is displaying:
    innovativeapprenticeship.org/community

    Regards, Cheryl

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

  • cdonahue
    Participant

    @cdonahue

    um, that header should have been “custom theme”


    Shmoo
    Participant

    @macpresss

    Well the normal ‘WordPress’ workflow would be something like this..

    Register a new Sidebar inside your functions.php
    – Duplicate the default sidebar.php file inside your theme folder and call the duplicated file sidebar-bbpress.php
    – Open sidebar-bbpress.php and change the default mark-up.
    – Go inside that community.php page template what is showing your forums page and search for the tag <?php get_sidebar(); ?> and change it to <?php get_sidebar( ‘bbpress’ ); ?>

    Save it and that should do the job.

    If everything goes well it will load the sidebar-bbpress.php if not it falls back to the default sidebar.php


    cdonahue
    Participant

    @cdonahue

    Thanks, that’s pretty much what I had done — except I gave my sidebar a different name. It’s registered; it shows up on my widget page; I put the bbpress items in my new sidebar; I edited the php file to give it the proper i.d.; I called it from the community.php template. Still defaulting to the regular page sidebar.

    What seems to be happening is that it doesn’t recognize the template I’m choosing for my Community page. It will only read the default template. Is that a thing with bbPress?


    cdonahue
    Participant

    @cdonahue

    Ah, I looked at the HTML and suspicions confirmed — it is not a page, but instead is classed as “forum-archive.” I think that means I can’t just change the template (obviously, as that is not working!). But I’m not sure what to do as my default pages have a custom sidebar that seems to prevent the bbpress sidebar from showing up on the Community/forum page.


    cdonahue
    Participant

    @cdonahue

    Solved!

    Added this code to the bottom of my ‘page’ template, as that appears to be the default page for bbpress:

    if (is_bbpress()) {
    get_sidebar(forum);
    } ?>

    et voila.


    Shmoo
    Participant

    @macpresss

    Cool :)


    mgingras
    Participant

    @mgingras

    Thank you so much for this Shmoo and perfect question cdonahue.
    Very precise answer and it worked for me!

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

You must be logged in to reply to this topic.