• Alright I am hoping this is a simple fix. I am trying to simply add a gravatar to my authors pages. The issue is with the code I have the gravatar shows up just as many times as the number of posts the author has.

    You can see what I mean here:
    author a:http://www.aquaculturetalk.com/author/seacucumber/
    author b:http://www.aquaculturetalk.com/author/mike/

    This is the code:
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <?php echo get_avatar( get_the_author_email(), ’80’ ); ?>
    <?php endwhile; else: ?>
    <p><?php _e(‘Sorry, no posts matched your criteria.’); ?></p>
    <?php endif; ?>

    I am using the loop in another section of the page, but I am hoping I can just modify this code to make the gravatar show up only once.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Create authors page with gravatar using the loop’ is closed to new replies.