• How do I display the author’s gravatar on single posts (single.php)? I tried:

    <?php echo get_avatar($curauth->user_email, ’80’, $avatar); ?>

    And it doesn’t work. Just shows generic Gravatar.

Viewing 2 replies - 1 through 2 (of 2 total)
  • this works for me in single.php in the loop:

    <?php echo get_avatar($post->post_author, '80', $avatar); ?>

    in your code, where do you get $curauth and $avatar from?

    i.e. what do you get if you output these?

    <?php var_dump( $curauth ); ?>

    or

    <?php var_dump( $avatar ); ?>

    Thread Starter sammy123

    (@sammy123)

    Thanks so much, that did the trick!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Author Gravatar on Single Post??’ is closed to new replies.