Skip to:
Content
Pages
Categories
Search
Top
Bottom

Change Buddypress Nav Menu


  • revadigital
    Participant

    @revadigital

    Hi – I changed Messages to Mail in the BuddyPress nav menu. And everything is fine except for members/[user]/messages/view/[#]/ page where the member views their messages. That tab still shows “Messages” instead of “Mail.” Below is the function that I added to bp_custom.php.

    function sb_custom_messages_menu_tabs(){
    global $bp;
    if ( bp_is_user() && bp_user_has_access() ) {
    $count = messages_get_unread_count( bp_displayed_user_id() );
    $class = ( 0 === $count ) ? ‘no-count’ : ‘count’;
    $bp->bp_nav[‘messages’][‘name’] = sprintf( __( ‘Mail<span class=”%s”>%s</span>’, ‘buddypress’ ), esc_attr( $class ), number_format_i18n( $count ) );
    }
    }
    add_action(‘bp_setup_nav’, ‘sb_custom_messages_menu_tabs’, 201);

    Any reason why this would not work for the page where members view their messages?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Change Buddypress Nav Menu’ is closed to new replies.
Skip to toolbar