Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • Fantacular Designs
    Participant

    @fantacular-designs

    My husband just helped me fix it with the simplest CSS! It didn’t even occur to me… Thank you for your help, though! The coding is theme specific, but he used “Inspect Element” to find out what to call the style. However, this is what he added.

    div#mceu_63-body {
    	display: none;
    }
    
    div#mceu_58-body {
    	display: none;
    }
    
    div#mceu_59-body {
    	display: none;
    }

    Thank you for your help!


    Fantacular Designs
    Participant

    @fantacular-designs

    My brilliant husband is my coder… He figured out how to define the default component, and saved the day. I hope this helps others.

    define( 'BP_DEFAULT_COMPONENT', 'profile' );
    
    function bpfr_hide_tabs() {
    global $bp;
    
    	if ( bp_is_user() && !is_super_admin() ) {
    		bp_core_remove_nav_item( 'activity');
    		bp_core_remove_nav_item( 'notifications');
    		bp_core_remove_nav_item( 'messages' );
    		bp_core_remove_nav_item( 'forums' );
    		bp_core_remove_nav_item( 'groups' );
    		bp_core_remove_nav_item( 'settings' );
    	}
    	
    }
    add_action( 'bp_setup_nav', 'bpfr_hide_tabs', 15 );

    Fantacular Designs
    Participant

    @fantacular-designs

    I also attempted to add them individually…

    function bpfr_hide_tabs() {
    global $bp;
    
    	if ( bp_is_user() && !is_super_admin() ) {
    		bp_core_remove_nav_item( 'activity' );
    		bp_core_remove_nav_item( 'notifications' );
    		bp_core_remove_nav_item( 'messages' );
    		bp_core_remove_nav_item( 'groups' );
    		bp_core_remove_nav_item( 'forums' );
    		bp_core_remove_nav_item( 'settings' );
    	}
    	
    }
    add_action( 'bp_setup_nav', 'bpfr_hide_tabs', 15 );
    

    I’ve noticed some changes require us to repeat ourselves, while others allow us to list changes within one line of code. Haven’t deciphered this anomaly just yet.


    Fantacular Designs
    Participant

    @fantacular-designs

    I placed the following code in the bp-custom.php which was found under the wp-content -> plugins.

    function bpfr_hide_tabs() {
    global $bp;
    
    	if ( bp_is_user() && !is_super_admin() ) {
    		bp_core_remove_nav_item( 'notifications', 'activity', 'groups', 'messages', 'forums', 'settings');
    	}
    	
    }
    add_action( 'bp_setup_nav', 'bpfr_hide_tabs', 15 );
    

    It breaks my site, shuts it down. From what I’ve read, I am supposed to specify what tab is open when opening a profile. Otherwise, browsers don’t know what to display since default is “Activity” and I’m removing it… Can someone please tell me where I went wrong? I appreciate the help!


    Fantacular Designs
    Participant

    @fantacular-designs

    Thank you, very much for your response! This was very helpful. I will study up and try again…

Viewing 5 replies - 1 through 5 (of 5 total)
Skip to toolbar