Hi,
i would like to insert a menu with avatar and message for logged in users in the menu area.
I want that the menu can be then, personalized in the default wordpress menu area.
For that, i have entered this code in functions child theme:
if ( is_user_logged_in() ) {
$current_user = wp_get_current_user();
if ( ($current_user instanceof WP_User) ) {
echo 'Welcome : ' . esc_html( $current_user->display_name );
echo get_avatar( $current_user->ID, 32 );
}
}
But now, i want display it on the menu.
How can i do this?
Regads,
Alexis
Hey Alexis,
Please try to use this hook: ava_after_main_menu
So you can insert it after the Main Menu.
Best regards,
Nikko