How to add bubble count in WordPress wp_nav_menu menu?

For flexibility, you could assign the CSS bubblecount class to the corresponding menu item:

enter image description here

and then target it with:

if( in_array( 'bubblecount', (array) $item->classes ) )
    $output .= '<span class="unread">'.my_function_here().'</span>';

in your code snippet above.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)