Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1097462

    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

    #1097553

    Hey Alexis,

    Please try to use this hook: ava_after_main_menu
    So you can insert it after the Main Menu.

    Best regards,
    Nikko

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.