[resolved] Gravatar not showing on blog but showing on pages (3 posts)

  1. Jesse Cohen
    Posted 3 years ago #

    I have a problem where the gravatar is showing on my pages using the following code:

    <?php while (have_posts()) : the_post(); ?>
    		<?php echo get_avatar( get_the_author_email(), '64' ); ?>
    	<?php endwhile; ?>

    Problem is that it is showing on my pages but when I go to the blog page it doesn't show the image - I have just an empty div where I set the function.

    I have the gravatar showing as part of a quote area within the header and it gets loaded on each page.

    Any ideas as I'm running locally and online in a dev area.

  2. Jesse Cohen
    Posted 3 years ago #

    A little wp_reset_query(); fixed the problem! :-)

  3. Drawer2
    Posted 3 years ago #

    Can I ask where in the code you put this? All gravatars are broken links in this theme and it looks shoddy.

    Never mind, found it elsewhere here:

    in your get_avatar() function

    and now gravatars show immediately again. :)

Topic Closed

This topic has been closed to new replies.

About this Topic