Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1011911
    Josiah W
    Participant

    How do I assign a sidebar to be used when a user is in buddy press or bbpress? I don’t want them to use the main sidebar that everything else uses. I see that I can assign the sidebar to a taxamony or to a page. I also don’t see an option in customization except:
    Layout
    *Use Global Content Layout
    Fullwidth

    #1012313
    Prasant Rai
    Moderator

    Hello Josiah,

    Thanks for writing in!

    To add sidebar in bbpress please walk-through solution shared in following thread:

    https://community.theme.co/forums/topic/add-a-custom-sidebar-to-bbpress-forums/#post-206346

    Thanks.

    #1013287
    Josiah W
    Participant

    That worked great for bbpress. How do I do this for BuddyPress?

    #1013806
    Rad
    Moderator

    Hi there,

    It’s the same, your customizer’s layout should have sidebar instead of full-width, then the code should be like this,

    add_filter('ups_sidebar', 'force_buddypress_sidebar', 20);
    
    function force_buddypress_sidebar ( $sidebar ) {
    return x_is_buddypress() ? 'REPLACE_THIS_WITH_SIDEBAR_ID' : $sidebar;
    }

    And just change the ID with your custom sidebar’s ID.

    Cheers!

    #1015457
    Josiah W
    Participant

    Perfect. Thank you very much.

    #1015517
    Rad
    Moderator

    You’re welcome!

  • <script> jQuery(function($){ $("#no-reply-1011911 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>