Skip to:
Content
Pages
Categories
Search
Top
Bottom

How To Create A bbPress SideBar

  • @bharatk

    Participant

    Hello,

    I followed the instructions at the link below to create a bbPress specific sidebar and it appears in the admin widgets section but the sidebar does not appear on the user side whether or not any content is added to that bbPress sidebar.

    Layout and functionality – Examples you can use

    Can anyone help?

    Thank you in advance,

    Bharat

Viewing 15 replies - 1 through 15 (of 15 total)
  • @robin-w

    Moderator

    sidebars are a nightmare since theme developers went away from the wordpress tradition of having standard files for each page type.

    Many now just have a page.php file, which frequently calls functions and stops any easy solution to the problem of getting a bbpress sidebar.

    So let’s start with what theme are you using?

    @veppa

    Participant

    You can try “bbPress WP tweaks” https://wordpress.org/plugins/bbpress-wp-tweaks/ plugin for adding forum sidebar. There you can select which wrapper to use for bbPress and which sidebar of your theme replace with bbpress sidebar. Try different wrappers to find one with sidebar because some themes do not have sidebar on page.php, which is in most cases default wrapper for bbpress.

    @bharatk

    Participant

    @robin-w,
    The theme is called Salient.


    @veppa
    ,
    At the moment I require only one layout of sidebar for the forums, and so prefer to do this with customisation rather than a plugin to keep the speed up.

    @robin-w

    Moderator

    suggest you pose the question to their support team, as a paid theme I of course can’t see it.

    @bharatk

    Participant

    @robin-w,
    I have created a support ticket and will keep you in touch. Would a zip of the main template files on the root of the theme help? If so, I can post a link here for you to have a look at them.


    @veppa
    ,
    I tried the bbPress WP tweak plugin but as per the customisation in the first post, the admin widget appeared, I added a text widget with some dummy text, but the sidebar on the user side did not.

    Your feedback would be appreciated.

    @bharatk

    Participant

    @robin-w,
    The theme developers say they don’t support the theme’s use with bbPress.

    If you can help, I would sincerely appreciate it. Thank you.

    @robin-w

    Moderator

    yes the template files would be useful.

    contact me via my website

    http://www.rewweb.co.uk

    @robin-w

    Moderator

    ok quick questions –

    1. are you getting any sidebar at the moment,

    2. and is the presence/absence consistent on all forum pages?

    @bharatk

    Participant

    @robin-w,

    1) I use two sidebar widget areas from the theme. One for blog archives and posts, and one for pages. These function and appear OK. There is also a WooCommerce sidebar but I don’t have WooCommerce installed so I can’t comment on that.

    2) When using the instructions at the link on the first topic post I made here, and also the bbPress WP tweak plugin the bbPress sidebar widget area appears, I’ve added the text area and some dummy text, saved it, but the sidebar does not appear on any of the forum pages (e.g. main forum index, topic list, topic).

    It came to mind that I’m quite sure that I used the linked instructions to they the sidebar to appear and it worked OK with a previous version of the theme. There have been a few updates since, where I have copied the customisations over to the updated theme, but I had assumed that the bbPress sidebar would continue to work. It was only when I looked at the forum recently, it looked and felt odd and that is when realised the sidebar had stopped working. But I’m not sure why the plugin does not work, but again these two non-functioning issues with the sidebar may be related.

    I hope that helps.

    And thank you.

    @robin-w

    Moderator

    ok, do you want the sidebar on the left or right?

    @bharatk

    Participant

    @robin-w,

    On the right.

    Thank you.

    @robin-w

    Moderator

    ok, the following assumes you know how to use FTP, if not come back

    You need to find

    wp-content/themes/salient/page-sidebar.php

    copy this and rename it to

    wp-content/themes/salient/bbpress.php

    so that you end up with both ie

    wp-content/themes/salient/page-sidebar.php
    wp-content/themes/salient/bbpress.php

    bbpress will now use this for all forums, so you should see a sidebar on all forum pages

    then see which sidebar is appearing, and we can amend it if needed.

    We do need to talk about child themes at a later stage

    @bharatk

    Participant

    @robin-w,
    That worked.

    It’s showing the page sidebar, as opposed to the blog sidebar.

    I added the bbpress.php copied file in the parent theme. I am using a child-theme but haven’t tried it yet, but it would be better to get this working there.

    And also next…. how do we create and show a bbPress specific sidebar?

    Thank you.

    @robin-w

    Moderator

    ok, put it into the child theme and remove form the parent theme – that way it doesn’t get lost on updates

    so you have a bbpress specific sidebar as per

    Layout and functionality – Examples you can use


    yes ?

    If so then in your new bbpress.php replace

    line 49 ish

    <?php get_sidebar(); ?>

    with

    <?php dynamic_sidebar( 'bbp-sidebar'); ?>

    @bharatk

    Participant

    @robin-w,
    Excellent – that works.

    Thank you very much – your help is appreciated.

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