How To Create A bbPress SideBar
-
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.
Can anyone help?
Thank you in advance,
Bharat
-
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?
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.
suggest you pose the question to their support team, as a paid theme I of course can’t see it.
@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.
@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.
ok quick questions –
1. are you getting any sidebar at the moment,
2. and is the presence/absence consistent on all forum pages?
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.
ok, do you want the sidebar on the left or right?
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.phpbbpress 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
@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.
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
yes ?If so then in your new bbpress.php replace
line 49 ish
<?php get_sidebar(); ?>
with
<?php dynamic_sidebar( 'bbp-sidebar'); ?>
@robin-w,
Excellent – that works.Thank you very much – your help is appreciated.
- You must be logged in to reply to this topic.