get user avatar wordpress

Use the get_avatar function to retrieve the avatar of a user in WordPress. This function takes the user's email or user ID as a parameter.

Example:

echo get_avatar( $user_id, 32 );

Explanation: 1. get_avatar is a WordPress function used to display a user's avatar. 2. The first parameter is the user's email or user ID. 3. The second parameter is the size of the avatar in pixels. 4. Use the echo statement to display the avatar on the webpage.