Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hide tabs


  • genuxio
    Participant

    @vieradel

    I’m looking for some function to paste in functions.php
    I want to hide the “Profile” tab.
    I’ve seen some function out there but do not work.
    Any help?

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

  • danbp
    Moderator

    @danbp

    hi @vieradel,

    when asking for help, please be kind enough to give details.
    https://buddypress.org/support/topic/when-asking-for-support-2/

    I’ve seen some function out there but do not work.

    Which one have you seen who doesn’t “work” ? Be constructive, saying this doesn’t help anybody ! At least, give the topic link.

    What have YOU done ? How and where ?

    A working example here (2015/02/28)


    genuxio
    Participant

    @vieradel

    Yes, sorry.
    I have Tthe latest versions of everything.
    I want to hide the Profile tab page.

    Now I have the file: bp-custom.php

    I must get some function that works for you not see the Profile tab.
    The issue is that I use clever theme, this has already created a profile page and do not want to be confused.

    hide profile


    danbp
    Moderator

    @danbp

    If you use this theme, i can’t help with you, as it’s a premium theme.
    If you want to use BuddyPress, you install it as described on Codex. The member page is created automatically in BP settings. Once installed, you copy paste the snippet into wp-content/plugins/bp-custom.php
    and it should work. The code part you need is:

    function bpfr_hide_top_nav() {	
    	if( !is_user_logged_in() ) {			
    		bp_core_remove_nav_item( 'profile' );
    	}
    }
    add_action( 'bp_ready', 'bpfr_hide_top_nav', 10 );

    This will remove the tab for visitors only. Logged in user will see the Profile tab.


    genuxio
    Participant

    @vieradel

    Thank you.

    function remove_menu_tabs(){
    global $bp;
    unset($bp->bp_nav['profile']);
    }
    add_action('bp_setup_nav', 'remove_menu_tabs', 201);
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hide tabs’ is closed to new replies.
Skip to toolbar