• Resolved chris19731973

    (@chris19731973)


    Hello Leo,

    We thought that the problem was solved but in fact it’s not resolved …
    We have already spent one week on this issue …

    I have just added this new topic because we still cannot set a RIGHT Sidebar in the Member page … I remind you that the Sidebar Layout in the customizer wrongly force/set all Sidebars Layout of all pages !!!

    Yes, we use Cache plugin but we have deactivated it …
    However, we have installed your theme in Localhost without any plugins and we meet the same issue … Therefore it’s not a Cache issue …

    I have just sent again our WP-Admin access to [email protected]
    Please could you try to set a RIGHT Sidebar in our the “Members” page ?

    If you could set a RIGHT Sidebar in our the “Members” page, Please let us know what was wrong because this Domain is just a test site and if it’s works we could install your GeneratePress Theme in our main site …

    Thanks in advance,

    Chris

Viewing 5 replies - 1 through 5 (of 5 total)
  • Leo

    (@leohsiang)

    Hi there,

    The Membership page isn’t working because it’s an auto-generated page from BuddyPress so the metabox is ignored by default.

    Can you give this PHP snippet a shot?

    add_filter( 'generate_sidebar_layout', function( $layout ) {
        // If we are on a category, set the sidebar
        if ( is_page( 17 ) ) {
            return 'right-sidebar';
        }
    
        // Or else, set the regular layout
        return $layout;
     } );

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    Thread Starter chris19731973

    (@chris19731973)

    Hello Leo,

    Thank you, the php code works well for the “BP Member” page … We have a function.php file and your Child Theme ….
    Please what is the code for the “BP Profile” and “BP Register” pages with a RIGHT sidebar like the “BP Member” pages ?

    For information :
    We have a Theme which is very popular but slow down our site …
    We wish to replace it by GeneratePress Theme because your Theme is lightweight and great for speed …
    Our site has 2 main plugins :
    – BuddyPress plugin with one “Member” Advanced Search Widget in the RIGHT Sidebar
    – One Classified Ads plugin with one “Listing” Advanced Search Widget in the LEFT Sidebar
    The Sidebar Layout of these 2 plugins is forced by the Site Wide Sidebar Layout settings in the Customizer … and we cannot set a particular Sidebar Layout for each pages and posts … Your PHP code should help …

    I have just updated the “Tags” of this message by “GeneratePress BuddyPress Sidebars” and I hope that it can help Search Engine and other users of your Theme ….

    Thanks in advance,

    Chris

    Theme Author Tom

    (@edge22)

    Hi there,

    What if you do this?:

    add_filter( 'generate_sidebar_layout', function( $layout ) {
        if ( function_exists( 'is_buddypress' ) && is_buddypress() ) {
            return 'right-sidebar';
        }
    
        // Or else, set the regular layout
        return $layout;
     } );

    Let me know ??

    Thread Starter chris19731973

    (@chris19731973)

    Hello Tom,

    Thank you very much for your code … It works great for BuddyPress Sidebars

    For information. I have pasted the code in the function.php file of the Child Theme …

    Due to one outdated BP extension, we use the BP “Legacy” Template instead of the BP “Nouveau” Template. Anyway, your theme improve the layout …

    I recommend your GeneratePress theme for BuddyPress plugin with the updated BP “Nouveau” Template because it’s really handsome … Moreover, your GeneratePress Theme loads fast on mobiles when we install Cache/image optimization plugins and use CDN … GTMetrix shows good results too …

    For information, we use mainly lightweight plugins even for Security … no e-commerce, no translation, no …. that might help to improve the speed too …

    Anyway, I just add links for other BP users :
    https://docs.generatepress.com/collection/sidebars/
    https://docs.generatepress.com/article/sidebar-layout/

    left-sidebar
    right-sidebar
    no-sidebar
    both-sidebars
    both-left
    both-right

    Thank you & Best Regards,

    Chris

    Theme Author Tom

    (@edge22)

    Thanks, Chris! Glad you’re enjoying GP ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘CANNOT set Sidebars by page’ is closed to new replies.