Title: [CODE FIX] Buddypress Tab Title: invalid string
Last modified: January 8, 2020

---

# [CODE FIX] Buddypress Tab Title: invalid string

 *  [Raruto](https://wordpress.org/support/users/raruto/)
 * (@raruto)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/code-fix-buddypress-tab-title-invalid-string/)
 * Hi [@netweblogic](https://wordpress.org/support/users/netweblogic/),
    I’ll report
   a bug in the following file:
 * `events-manager/buddypress/bp-em-core.php#L82`
 * **Bug Description:**
    Currently the presence of span tags prevents the string“
   Events” from being translated (ie. “Event” instead of “Events (0)”).
 * **How to fix it:**
 *     ```
       $event_count = EM_Events::count( array( 'scope'=>'future',  'owner'=> bp_displayed_user_id() ));
       if( empty($event_count) ) $event_count = 0;
       $main_nav = array(
         // 'name' => __( 'Events', 'events-manager'). '<span>' . esc_html($event_count) . '</span>',
         'name' => __( 'Events', 'events-manager'). ' (' . esc_html($event_count) . ')', 
         'slug' => em_bp_get_slug(),
         'position' => 80,
         'screen_function' => 'bp_em_events',
         'default_subnav_slug' => 'profile'
       );
       ```
   
 * _Greetings,
    Raruto
    -  This topic was modified 6 years, 5 months ago by [Raruto](https://wordpress.org/support/users/raruto/).
    -  This topic was modified 6 years, 5 months ago by [Raruto](https://wordpress.org/support/users/raruto/).
    -  This topic was modified 6 years, 5 months ago by [Raruto](https://wordpress.org/support/users/raruto/).

Viewing 1 replies (of 1 total)

 *  Plugin Support [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * (@angelo_nwl)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/code-fix-buddypress-tab-title-invalid-string/#post-12308352)
 * Hi,
 * I’m going to let the Devs know about this.

Viewing 1 replies (of 1 total)

The topic ‘[CODE FIX] Buddypress Tab Title: invalid string’ is closed to new replies.

 * ![](https://ps.w.org/events-manager/assets/icon-256x256.png?rev=3550347)
 * [Events Manager - Calendar, Bookings, Tickets, and more!](https://wordpress.org/plugins/events-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/events-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-manager/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * Last activity: [6 years, 5 months ago](https://wordpress.org/support/topic/code-fix-buddypress-tab-title-invalid-string/#post-12308352)
 * Status: not a support question