BuddyDev

Search

[Resolved] How to hide the sidebar properly in member profile view

  • Participant
    Level: Initiated
    Posts: 5
    Matthew Brown on #9307

    For the page that displays members, I set the page type to one with no sidebars. This works for the list of members example.com/members/ but with the member profiles, the sidebar is back emaple.com/members/foobarson/

    I am using the Customisr theme (actually a child theme with a few CSS tweaks). Is anyone able to point me in the right direction for figuring out what I am doing wrong?

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #9322

    Hi Matthew,
    Thank you for posting.

    You can put the following code in your bp-custom.php or your theme’s functions.php

    
    
    /**
     * Make user profiles single column layout for the customizer theme.
     *
     * @param string $layout
     *
     * @return string
     */
    function buddydev_customizer_profile_single_col_layout_filter( $layout ) {
    
    	if ( bp_is_user() ) {
    		$layout ='f';
    	}
    
    	return $layout;
    
    }
    add_filter( 'tc_screen_layout', 'buddydev_customizer_profile_single_col_layout_filter' );
    
    

    Hope that helps.

  • Participant
    Level: Initiated
    Posts: 5
    Matthew Brown on #9327

    Ah, thank you. I have been driving myself mad trying to figure that out.

    I cannot strongly enough express how grateful I am for this.

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #9334

    You are welcome 🙂

The topic ‘ [Resolved] How to hide the sidebar properly in member profile view’ is closed to new replies.

This topic is: resolved