-
AuthorPosts
-
February 12, 2015 at 12:33 pm #394938
Hi!
I would like to show the person’s identifying connected in the enfold secondary menu.
I use the plugin Woo Commerce (2.3.0). I also downloaded WooCommerce Menu Extension (1.1.), But was not able to show the user name. Can I put a code in the menu?
Best regards,
BubaramaFebruary 12, 2015 at 9:36 pm #395354Hey Bubarama!
Are you trying to display the username of whoever is logged in? Your wanting to display this in your secondary menu?
Go ahead and take a screenshot and highlight what your trying to do so we know for sure.
Cheers!
ElliottFebruary 18, 2015 at 8:34 pm #398441This reply has been marked as private.February 19, 2015 at 12:17 pm #398815Hi!
Add this on 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>"; } }
Use the “header-welcome” class to adjust the position of the new container.
Cheers!
IsmaelFebruary 23, 2015 at 1:04 pm #400599Hi Ismael!
Thank you for your reply. It works.
However I am unable to put the text (here “Welcome admin”) on the same line and with the same formatting as the menus.
How can I do that ?
Best regards,
Bubarama- This reply was modified 9 years, 10 months ago by Bubarama.
February 23, 2015 at 1:05 pm #400600This reply has been marked as private.February 24, 2015 at 5:27 pm #401536Hi!
can you post a link showing the issue? I can’t see it on your homepage. We need to inspect it to be able to provide you some CSS. However try this code in Quick CSS:
#header-welcome { font-size: 11px; color: #3c3c3b; }
Best regards,
AndyFebruary 24, 2015 at 5:27 pm #401537Hey!
Add this to your custom CSS.
#header-welcome { top: -10px; left: -200px; position: relative; }
And play around with the top and left values to move it around. If that’s not working then send us a WordPress login and we’ll take a look.
Regards,
Elliott- This reply was modified 9 years, 10 months ago by Elliott.
February 24, 2015 at 6:32 pm #401590Hi Elliot
I added your code in my custom CSS (on the top of Quick CSS). However the text “welcome admin” is still not at the good place, I know I can change the values to place it but I really would like to include it in the enfold secondary menu. I want integrate it in the menu 2 (ideally between “Mon Compte” and social media icons), with this custom css we just place it and it’s not really integrate. For exemple when i reduce screen format, only “welcome admin” is moving…
What can I do?
Cheers!
BubaramaFebruary 24, 2015 at 6:34 pm #401594This reply has been marked as private.February 25, 2015 at 6:15 pm #402259Hi!
I added this to your custom CSS.
#header-welcome { position: absolute; right: 0; top: -10px; width: auto; } .av_secondary_right .sub_menu { padding-right: 100px !important; }
It should be in the correct spot now.
Best regards,
ElliottMarch 4, 2015 at 3:54 pm #405809Hi Elliot
It works !
ThanksBubarama
-
AuthorPosts
- The topic ‘Woo commerce – Display the user name’ is closed to new replies.