<?php
// Ensure user is logged in
if( is_user_logged_in() ) {
// Display current logged in user's avatar (includes tag)
echo get_avatar( get_current_user_id(), 96 );
// Display current logged in user's avatar URL
echo get_avatar_url( get_current_user_id(), array( 'size' => 96 ) );
}
Copyright © 2025 by WP CODE SNIPPETS
Join our mailing list to receive the latest news and updates from our team.