Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #726071

    Hi
    I used this snippet for welcome txt:
    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’>Bienvenue “. $user->display_name .”</div>”;
    }
    }

    And this css:
    #header-welcome { position: absolue; }
    #header-welcome {font-size: 14px; color: #FFFFFF;}

    welcome txt display but how to put him on the left (not actually under) of the top menu.
    Same raw and just before “Mon compte”
    see screen shoot. Thanks
    Thanks

    #726081

    Second question :
    insteed of name would prefere first name. In database is first_name
    When put first_name insteed of name in snippet it doesn’t work
    Any idea?

    #726093

    Hi!

    Can you please create a temporary admin login and post it here privately so we can look into it?

    Cheers!
    Yigit

    #726111

    please find datas

    #727451

    Hi,

    I think you have to use something like this to echo the first name:

    $current_user->user_firstname

    https://codex.wordpress.org/Function_Reference/wp_get_current_user

    Best regards,
    Rikard

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