Skip to:
Content
Pages
Categories
Search
Top
Bottom

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

  • Avatar of applegateian
    applegateian
    Participant

    @applegateian

    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)
  • Avatar of @modemlooper
    @modemlooper
    Moderator

    @modemlooper

    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' );
    Avatar of applegateian
    applegateian
    Participant

    @applegateian

    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

    Avatar of @modemlooper
    @modemlooper
    Moderator

    @modemlooper

    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

    Avatar of applegateian
    applegateian
    Participant

    @applegateian

    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)

You must be logged in to reply to this topic.