Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #622043

    Hello,

    I would like to display on the secondary menu the login username of the client.

    I tried this code on the functions.php
    add_action(‘avia_meta_header’, ‘ava_get_user’);
    function ava_get_user() {
    if ( is_user_logged_in()) {
    $user = wp_get_current_user();
    echo “<div id=’header-welcome’>Welcome “. $user->display_name .”</div>”;
    }
    }

    The message appear but I have a problem :
    I would like this message to appear on the left of the menu (where I can put the phone number etc) and keep the same css style (same font, color etc) as the secondary menu
    And actually that’s not the case

    Can you help me ?

    Thanking you in advance !

    #622832

    Hey agenceism,

    Could you provide us with a link to the site in question so that we can take a closer look please?

    Regards,
    Rikard

    #623157

    Hello,

    I have succeeded via the CSS.

    here is the code I have used (if it can help someone…) :
    #header-welcome {
    position: relative;
    right: 950px;
    top: -19px;
    width: auto;
    font-family: ‘Open Sans’;
    font-weight: bold;
    color: white

    }
    .av_secondary_left .sub_menu {
    padding-left: 50px !important;
    }

    Thanks again for your availability !
    Agenceism

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘woocommerce username login’ is closed to new replies.