This topic has 18 replies, 8 voices, and was last updated 8 years by blux89.

  • Author
  • #4484
     SQadmin
    Keymaster

    To add a right sidebar to members page do the following:
    1. Add this code to sweetdate-child/functions.php

    COPY CODE
    
    add_filter('kleo_bp_directory_main_cols', 'kleo_custom_members_cols');
    function kleo_custom_members_cols() {
    	return 'eight';
    }
    
    add_action('bp_after_directory_members', 'kleo_add_buddy_sidebar', 99);
    function kleo_add_buddy_sidebar() {
    	get_sidebar('buddypress');
    }
    

    2. Add this code to WP Admin – Sweetdate – Styling options – Quick css:

    COPY CODE
    
    div#main .widgets-container.sidebar_location {text-align: left;}
    
    #11304
     bendisraeli
    Participant

    Thanks for the code!

    How would one get a left-hand sidebar on the members page using this please?

    #11481
     Abe
    Keymaster

    Hi, this is the code but you will need to change a file for it to work until version 2.5 of the theme

    COPY CODE
    
    //Members left sidebar
    add_filter('kleo_bp_directory_main_cols', 'kleo_custom_members_cols');
    function kleo_custom_members_cols() {
    	return 'eight';
    }
    
    add_action('bp_before_directory_members', 'kleo_add_buddy_sidebar', 99);
    function kleo_add_buddy_sidebar() {
    	get_sidebar('buddypress');
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #18692
     hugblue
    Participant

    Hi ..

    When using the first part of the code :

    COPY CODE
    add_filter('kleo_bp_directory_main_cols', 'kleo_custom_members_cols');
    function kleo_custom_members_cols() {
        return 'eight';
    }
     
    add_action('bp_after_directory_members', 'kleo_add_buddy_sidebar', 99);
    function kleo_add_buddy_sidebar() {
        get_sidebar('buddypress');
    }

    Then how do i by this code make the width smaller ?
    I tried changing the eight to seven and six. But seems to do nothing.

    Thz.

    #18991
     Abe
    Keymaster

    Changing to six will make the sidebar smaller. just tested it

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #18997
     hugblue
    Participant
    This reply has been set as private.
    #19261
     Abe
    Keymaster

    I entered your site and it has six columns. Check your caching

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #19279
     hugblue
    Participant

    Hi Abe ..

    Just tested it again and sorry there was a change.

    When i change the number/text ” eight ” then it is the members cols that is changing.

    But it is the right sidebar i want a little smaller!

    How do i do this ?

    #19457
     Abe
    Keymaster

    to do that you should put instead of get_sidebar(‘buddypress’); -> get_sidebar(‘buddypress-members’); and create a sidebar-buddypress-members.php and in is copy the contents from the sidebar.php but change the $sidebar_class to a higher value.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #19959
     iamj_kim
    Participant

    I put a left sidebar on the member directory, but can’t see how to change the aside- class to three columns instead of four. Can you point me in the right direction? Thanks.

    Attachments:
    You must be logged in to view attached files.
    #20379
     Abe
    Keymaster

    Hi, you could create a new file sidebar-bp-members and copy the content from sidebar.php to use it just for the members page and make the changes to use four columns there. Also you need to change get_sidebar() to get_sidebar(‘bp-members’) in the members page template

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #32140
     pablo_qac87
    Participant

    Hello.

    Is it possible to add both? (one to the left and the other to the right?). Also I want to add another to the top (because I want to add 3 banners of adsense). Is it possible?

    Thank you

    #32141
     pablo_qac87
    Participant

    Also, can you send me the code to adda right sidebar to homepage. Thanks

    #32181
     Abe
    Keymaster

    For Left and Right sidebar try adding this code:

    COPY CODE
    
    //Members left sidebar
    add_filter('kleo_bp_directory_main_cols', 'kleo_custom_members_cols');
    function kleo_custom_members_cols() {
        return 'four';
    }
     
    add_action('bp_before_directory_members', 'kleo_add_buddy_sidebar', 99);
    function kleo_add_buddy_sidebar() {
        get_sidebar('buddypress');
    }
    add_action('bp_after_directory_members', 'kleo_sidebar', 99);
    
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #32182
     Abe
    Keymaster

    @pablo_qac87 for the homepage you have 2 options:
    – edit your page and choose a different template other that Front Page
    – edit the template page-templates/front-page.php and adjust it somehow like right_sidebar.php

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #46172
     Neptin
    Participant

    The width on the sidebar is smaller than on any other page with this enabled. How can I make the sidebar the same width as the other pages?

    #46173
     Neptin
    Participant

    Also, the alignment is set to centered somehow, so all the content in the sidebar is being centered.

    #46244
     Abe
    Keymaster

    put a link to your page to see what is wrong please

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #106141
     blux89
    Participant

    why don’t this work for me can some one help me how can i add left and right side bar to my members page

Viewing 19 posts - 1 through 19 (of 19 total)

The topic ‘Members directory page with sidebar – How to’ is closed to new replies.

Log in with your credentials

Forgot your details?