Post Avatar Custom Size In WordPress

Used before category names. Blog WordPress WordPress Development

WordPress has default size for post author avatar. If you increase or decrease the size, use following code.

Go to place that you want to display the avatar.

$author_avatar_size = apply_filters('hs_author_avatar_size', 100);
echo get_avatar(get_the_author_meta('user_email'), $author_avatar_size);

Above code tells WordPress that, display author avatar image with 100px width and height.

Tags: