Hello @paul2411,
The quality of the images you sent is low, and I can’t understand where you are setting the custom sidebar.
Are you setting the custom sidebar on a simple page, or is it in the archive page of BBPress?
Please tell us how we can replicate your steps to arrive at the issue on a fresh WordPress installation.
By the way, I fully tested in the following way and didn’t see any issues,
First created a custom sidebar
then added “meta box” to the “forum” CPT by this article: https://docs.oceanwp.org/article/368-add-the-oceanwp-settings-metabox-in-your-custom-post-type
After that set that custom sidebar to one of /forum/ and didn’t see any issue.
And for the archive page(/forums/), I use the following function:
function custom_sidebar_only_for_archive() {
if ( is_page_template( 'forums' ) ) {
return 'ocs-forum'; // Display a specific sidebar on a certain template
} else {
return 'ocs-forum'; // Use the default sidebar for other cases
}
}
add_filter( 'ocean_get_sidebar', 'custom_sidebar_only_for_archive' );
Please check the screenshots attached at this link:
https://postimg.cc/gallery/rktzqd6
I hope it helps,
Best Regards
-
This reply was modified 11 months ago by Shahin.