This topic has 11 replies, 3 voices, and was last updated 9 years by Abe.

  • Author
  • #9803
     kriminal
    Participant

    Is it possible to remove the right sidebar widgeted area so the Groups goes across the whole page. Same with the activity page?

    http://seventhqueen.com/demo/sweetdatewp/groups/

    http://seventhqueen.com/demo/sweetdatewp/activity/

    #9926
     Abe
    Keymaster

    Hi,
    There isn’t a setting in the admin panel but you can add this code to sweetdate-child/functions.php file to accomplish that

    COPY CODE
    
    //remove sidebar for activity and groups pages
    add_action('kleo_before_page','my_remove_sidebar');
    
    function my_remove_sidebar() {
    	if(bp_is_groups_component() || bp_is_activity_component()) {
    		remove_action('kleo_buddypress_after_content', 'kleo_sidebar');
    		add_filter('kleo_buddypress_content_class', create_function('', 'return "twelve";'));
    	}
    }
    
    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.

    #55598
     Ricardo
    Participant

    This function does not work anymore. Could you tell the new one?

    #55642
     Abe
    Keymaster

    hm.. the function should work. Add it to the child theme functions.php and make sure it is active

    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.

    #55671
     Ricardo
    Participant

    It doesn’t. I was looking at the code and found it out how to partially fix it.

    I couldn’t fix the commented line:

    COPY CODE
    
    //remove sidebar for activity and groups pages
    add_action('kleo_before_page','my_remove_sidebar');
    function my_remove_sidebar() {
    	if(bp_is_groups_component() || bp_is_activity_component()) {
    		remove_action('kleo_buddypress_after_content', 'kleo_buddypress_sidebar');
    		//add_filter('kleo_content_class', create_function('', 'return "twelve";')); //this does not work
    	}
    }
    
    #55680
     Abe
    Keymaster

    give me a link to that page. that line if you un-comment it, it will make the main content full width

    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.

    #55681
     Abe
    Keymaster

    oh sorry, it is :
    kleo_buddypress_content_class instead of kleo_content_class

    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.

    #55693
     Ricardo
    Participant

    mmmm… Strange. The code looks logically fine but the member profile also had the right sidebar removed and turned full width… The intention is only activity and group pages full width. Any alternative for the “if” clause?

    This is the function for now:

    COPY CODE
    
    //remove right sidebar for activity and groups pages
    add_action('kleo_before_page','my_remove_sidebar');
    function my_remove_sidebar() {
    	if(bp_is_groups_component() || bp_is_activity_component()) {
    		remove_action('kleo_buddypress_after_content', 'kleo_buddypress_sidebar');
    		add_filter('kleo_buddypress_content_class', create_function('', 'return "twelve";'));
    	}
    }
    
    #55700
     Ricardo
    Participant

    This works to keep the right sidebar only on profile page.

    COPY CODE
    
    //remove sidebar for activity and groups pages
    add_action('kleo_before_page','my_remove_sidebar');
    function my_remove_sidebar() {
    	if(!bp_is_member()) {
    		remove_action('kleo_buddypress_after_content', 'kleo_buddypress_sidebar');
    		add_filter('kleo_buddypress_content_class', create_function('', 'return "twelve";'));
    	}
    }
    
    #55701
     Abe
    Keymaster

    For activity page and group page you can do
    bp_is_groups_directory() || bp_is_activity_directory()

    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.

    #55702
     Ricardo
    Participant

    Thanks Abe, your solution is better!

    #55705
     Abe
    Keymaster

    Great. Glad I could be of help.

    Have a nice day.

    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.

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

The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?