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
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?
Hi!
Can you please create a temporary admin login and post it here privately so we can look into it?
Cheers!
Yigit
please find datas
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