How To Add Gravatars For The Post Author in WordPress

/ Published in: PHP
Save to your folder(s)

get_the_author_email outputs the post author’s email and the “80” is the size of the avatar image in pixels & it has to be in the loop!

Copy this code and paste it in your HTML
  1. <?php echo get_avatar( get_the_author_email(), '80' ); ?>


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.