Quantcast
Viewing latest article 6
Browse Latest Browse All 9

Quick Tip: Display avatar for currently logged in user

Image may be NSFW.
Clik here to view.
How about displaying the avatar for current logged in user?

By Default it comes with a get_avatar function. Adding this snippet to your wordpress template will display the currently logged in users avatar in your theme.

To adjust the side of the avatar change the number 64 within the get_avatar function default is 96 and max size is 512.

<?php
       global $current_user;
       get_currentuserinfo();
       echo get_avatar( $current_user->ID, 64 );
?>

The post Quick Tip: Display avatar for currently logged in user appeared first on WPKube.


Viewing latest article 6
Browse Latest Browse All 9

Trending Articles