Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Hide one of the profile tabs (change avatar)

  • @applegateian

    Participant

    Hi

    I want to hide one of the tabs in the user profile page, change avatar.

    We have this in the dropdown in the menu bar but don’t want it in the tabs on the users profile page.

    Is there a way to hide it? It doesn’t have a unique ID to be able to hide it in CSS.

    Thanks,

    Ian

Viewing 4 replies - 1 through 4 (of 4 total)
  • @modemlooper

    Moderator
    function bp_remove_nav_item() {
        global $bp;
    
        bp_core_remove_subnav_item( $bp->profile->slug, 'change-avatar' );
    }
    add_action( 'bp_include', 'bp_remove_nav_item' );

    @applegateian

    Participant

    Hi @modemlooper – is this for functions.php or bpcustom? Added to both and it didn’t remove the tab from the profile.

    Anything I could be doing wrong here?

    Thanks,

    Ian

    @modemlooper

    Moderator
    function bp_remove_nav_item() {
        global $bp;
    
        bp_core_remove_subnav_item( $bp->profile->slug, 'change-avatar' );
    }
    add_action( 'wp', 'bp_remove_nav_item' );

    just need to load function sooner. only use functions.php if your code is for the theme. Otherwise, use bp-custom.php

    @applegateian

    Participant

    Sorry, this can be resolved, I had a link hardcoded – sorry for not realising sooner

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Hide one of the profile tabs (change avatar)’ is closed to new replies.
Skip to toolbar