Skip to:
Content
Pages
Categories
Search
Top
Bottom

Two different sidebars in bbpress?


  • siobhan61
    Participant

    @siobhan61

    Hello,

    I’ve created two sidebar widgets to use with bbpress forums (v. 2.5.3) — one for the landing page and the other for bbpress interior pages (forums, topics, etc.). I made a page called bbpress.php (copied from my index page) and have put that in my child theme. From that page I’m calling the bbpress sidebars I created.

    The problem is that I can only call one of them — the secondary widget. The widget I created for the forum homepage (which is what I was assuming bbpress.php is) doesn’t appear when I call it (defaults to another sidebar I have set up on the website for page.php).

    http://innovativeapprenticeship.org/community/

    Does anyone know how to set up two sidebars for bbpress, and the template files from which I should call them?

    Thanks, Cheryl

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try making a single sidebar eg sidebar-bbpress.php and call that from your bbpress.php file and use bbPress conditionals

    bbPress Conditional Tags

    eg

    
    <?php if ( bbp_is_single_forum() || bbp_is_single_topic() || bbp_is_single_reply() ) : ?>
    ...primary sidebar code here...
    <?php else : ?>
    ...secondary sidebar code here...
    <?php endif; ?>
    

    siobhan61
    Participant

    @siobhan61

    Great suggestion, thanks! I love conditionals…

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar