How to display logged in user name with avtar in Menu

By | September 30, 2016

If you added user Login / Register menu item in WP menu and want to hide it once user already logged in as well in place of Login / Signup want to display currently logged in user name with Profile / Avtar picture than current post become very helpful for you to easily achieve it with your wordpress website blog.

To hide Login, Register ( Sign up ) etc menu item when user already logged in and no need to display it than you can easily achieve it by using wordpress plugin If Menu

After Install and activate If menu – Display or hide menu items with conditions go to wp-admin > Appearance and do setting like given in below screenshot.

display-logged-in-user-avtar-with-display-name-in-menu

Now time to Dynamically add currently logged in user menu item with Display name and Avtar (Profile Picture ) by get_avatar function and wp_nav_menu_items woprdpress menu filter action .

add following code in your active theme function.php file