Skip to:
Content
Pages
Categories
Search
Top
Bottom

How I renamed profile my tabs and bubbles disappeared


  • sundev
    Participant

    @sundev

    Hi, I just renamed my profile tabs successfully with this sample code below:
    but I noticed the circled counting bubble in front of messages, Notifications & son on. disappeared when I renamed them, but comes back when I change names back to default name!

    any help on how I could make them show when I rename please? thanks

    CODE:

    
    function mb_profile_menu_tabs(){
    global $bp;
    $bp->bp_nav['activity']['position'] = 15;
    $bp->bp_nav['messages']['position'] = 10;
    $bp->bp_nav['messages']['name'] = 'Mail';
    $bp->bp_nav['friends']['name'] = 'Contacts';
    $bp->bp_nav['profile']['name'] = 'Account';
    }
    add_action('bp_setup_nav', 'mb_profile_menu_tabs', 201);
Viewing 7 replies - 1 through 7 (of 7 total)

  • sundev
    Participant

    @sundev

    Your help is appreciated.


    modemlooper
    Moderator

    @modemlooper

    function mb_profile_menu_tabs(){
    global $bp;
    $bp->bp_nav['friends']['name'] = sprintf( 'Lovers <span>%d</span>', friends_get_total_friend_count() ) ;
    }
    add_action('bp_setup_nav', 'mb_profile_menu_tabs', 201);

    sundev
    Participant

    @sundev

    Hi @modemlooper, thank you so much for the rely. I tried the code but it brought error. “call to undefined function friends_get_total_friends_count()”. Any adjustment please?

    Thanks.


    sundev
    Participant

    @sundev

    Oops! Thanks, it working now. I added extra ‘s’ instead of friend.


    sundev
    Participant

    @sundev

    But only working for friends tab. Incase of notifications I tried change the word friend to notification in the code where applicable but didn’t work, if I change to friend, it works but brought the same countings that is meant for friend. Is there a separate way I should do others? I am changing messages, notifications & friends, am okay with friends tab now. Thanks in anticipation.


    modemlooper
    Moderator

    @modemlooper

    look through core files each component folder has a loader file that creates tabs. There yiu can find count function


    sundev
    Participant

    @sundev

    Thanks a lot, I’m just on the last change, please am I missing anything here? It’s giving error and is what I got.

    global $bp; $bp->bp_nav[‘notifications’][‘name’] = sprintf( ‘Alerts<span>%d</span>’, notifications_get_total_notification_count() ) ;

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How I renamed profile my tabs and bubbles disappeared’ is closed to new replies.
Skip to toolbar