Display author gravatar within the loop
-
Hi,
I’ve been trying to use get_avatar to display the author’s gravatar under each post on the Indie Travel Podcast.
This is the code I’ve been using in single.php:
<?php echo get_avatar( $id_or_email = '<?php the_author_email(); ?>', $size = '80', $default = 'https://indietravelpodcast.com/images/no_gravatar.jpg' ); ?> <p class="authorprofile"><?php the_author_description(); ?> </p>
Unfortunately the following line doesn’t work: everything else is fine. This code currently displays the default image.
$id_or_email = '<?php the_author_email(); ?>'
Can anyone please suggest the right value for id_or_email?
Thanks in advance, mars-hill
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Display author gravatar within the loop’ is closed to new replies.