Add Hi, Username! to menu, I have the username working, but not the Hi part

The following code will allow me to display the username in the menu as an item in the menu, which means I can move it around in the menu, but I am unable to add a greeting.. ie., Hi, username! This would be ideal if I could just add text in front of the username..

To use this, you have to place #profile_name# as the navigation label in the custom link in the menu to display the username, just cant figure out how to get Hi, username!

function give_profile_name($atts){



return $name;


add_shortcode(‘profile_name’, ‘give_profile_name’:wink:;

add_filter( ‘wp_nav_menu_objects’, ‘my_dynamic_menu_items’ );

function my_dynamic_menu_items( $menu_items ) {

foreach ( $menu_items as $menu_item ) {

if ( ‘#profile_name#’ == $menu_item->title ) {

global $shortcode_tags;

if ( isset( $shortcode_tags ) ) {

// Or do_shortcode(), if you must.

$menu_item->title = call_user_func( $shortcode_tags );




return $menu_items;


any help on this would help my wall out.. and my head.