Skip to:
Content
Pages
Categories
Search
Top
Bottom

How can I hide ‘Mentions’, ‘Favorite’ tabs under the Activity


  • clancel
    Participant

    @clancel

    Hi. Is it possible to hide the Personal, Mentions, Favorite default tabs under the Activity tab? I do wish the show the activity so I do not wish the disable the Activity setting, but I would like to be able to hide the others like Mentions and Favorite. Let me know if this is possible. I look forward to your response.

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

  • Varun Dubey
    Participant

    @vapvarun

    @clancel you can try following to remove sub tabs

    
    function bp_remove_sub_tabs() {
        if ( ! bp_is_user() ) {
            return;
        }
        bp_core_remove_subnav_item( 'activity', 'mentions' );
    	 bp_core_remove_subnav_item( 'activity', 'favorites' );
    }
    add_action( 'bp_actions', 'bp_remove_sub_tabs' );

    clancel
    Participant

    @clancel

    Thank you for this code. It’s working now. I would also like to remove the ‘Home’ tab as well. Do you know the code that I can use to remove the ‘Home’ tab?


    vandehee
    Participant

    @vandehee

    Hello, i want the same to hide the mention and favorite tabs.. But i dont now how to past the code:
    function bp_remove_sub_tabs() {
    if ( ! bp_is_user() ) {
    return;
    }
    bp_core_remove_subnav_item( ‘activity’, ‘mentions’ );
    bp_core_remove_subnav_item( ‘activity’, ‘favorites’ );
    }
    add_action( ‘bp_actions’, ‘bp_remove_sub_tabs’ );

    On the theme editor? can you tel me how to do that ? i have never yet done that..
    I hope you can help me..
    Kind regard vd Hee


    shanebp
    Moderator

    @shanebp

    Place it in the functions.php file in your child theme.


    vandehee
    Participant

    @vandehee

    Thanks, i have make a child theme and should I put the text at the bottom in functions.php? It doesn’t work..

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar