Yet another sidebar issue
Yes, I’ve searched and came across numerous similar problems about the sidebar not displaying on the forum pages. Yes, I read through the canned responses to review this page: https://codex.bbpress.org/themes/theme-compatibility/getting-started-in-modifying-the-main-bbpress-template/.
We’re using the Bridge theme and I’ve made sure the forums page is using the page.php template, AND the <?php get_sidebar();?> IS in the code. So why is the forum index showing full-width and not showing my bbPress sidebar?
Looking at source code of the rendered page does not show the sidebar though.
ok, can you paste the page.php file here please AND make sure you enclose it all as code !
Sure! Thanks for looking!
(mod note: when people search the forums, they hate scrolling through giant pieces of code. Small snippets use code tags, large files use external services to host the code.)
Your theme looks to be using post meta to display the sidebars, so there might be custom fields to configure which sidebar to display which will most likely be on the default WordPress post types (page and post) when you create/edit them. These options may not be on the bbPress post type creation/editing screens in the WordPress backend.
I see there is a ton of code that might not even be usable because bbPress post types may not have these custom field options to configure things like the slider, background color, and other options I can see in the code.
I do see from the classes that this uses a responsive grid layout so maybe focus and keep this class as it is a two column layout, one for the content and one for the sidebar.
two_columns_66_33 grid2 clearfix
You may need to contact your theme author for further help on this.
ok, sorry been tied up elsewhere, and only just got back to looking at this.
I think I can get it working and would suggest you do the following
1. take a copy of page.php and save it into your theme as bbpress.php
so you end up with
wp-content/themes/%mytheme%/bbpress.php where %mytheme% is your currently active theme’s name.
Now edit that file as follows
The theme seems to be looking for a value of the sidebar for the post meta of the page ID. Since I suspect that bbpress is not having that at that point, it can’t look it up.
Now the page.php (which is now bbpress.php!) tries to set this in line 4 using
$sidebar = get_post_meta($id, "qode_show-sidebar", true);
and then the page.php (which is now bbpress.php!) later on looks for what value between 1 and 4 that is set to, which would determine what if any sidebars are shown.
therefore in bbpress.php try changing line 4 from
$sidebar = 1
save the file and see what happens
$sidebar = 2
$sidebar = 3
$sidebar = 4
each should change what sidebar appears and where, so you should be able to get one working !
Do come back if anything isn’t clear, or if you need further help, or just to tell us that we’re wonderful (or rubbish!)
- You must be logged in to reply to this topic.