• Resolved geezerd

    (@geezerd)


    Trying to get the author’s Gravatar pic to display, but this code isn’t doing it:

    <?php query_posts("author=244&showposts=1"); ?>
    <?php while (have_posts()) : the_post(); ?>
    <div class="author-feature">
    <?php echo get_avatar( get_the_author_email(), '36' ); ?>
    <h3><?php the_title(); ?></h3>
    <p style="text-align:right;">by <?php the_author() ?></p>
    <?php the_content('_'); ?>
    </div>
    <?php endwhile; ?>

    This: <?php echo get_avatar( get_the_author_email(), '36' ); ?> isn’t working. Anyone know what I’m doing wrong?

Viewing 6 replies - 1 through 6 (of 6 total)
  • get_the_author_email() is deprecated.

    Try using get_the_author_meta( 'user_email' ) instead?

    Thread Starter geezerd

    (@geezerd)

    Yup, I saw that. Changed it.

    But now I get the Mystery Man pic on my post, not my Gravatar image, which IS working, because I see it in the dashboard when I look at “Users”.

    ?

    Thread Starter geezerd

    (@geezerd)

    …and i see it right here, too, hahah.
    Here’s where I’m testing it: http://rebellionnews.com/archives/

    Thread Starter geezerd

    (@geezerd)

    Got it
    I had put ‘author_email’ where it should have had ‘user_email’

    Thanks, Chip!

    Glad you got it working!

    (p.s. you might want to check with a Forum moderator, but it appears that you may have been marked as a “bozo” (spam). I see your posts via email notification, but they’re not showing up in the thread.)

    Thread Starter geezerd

    (@geezerd)

    Ha, yah, they disappear when I log out.
    Geeks love the online power trip, hahah.
    I’ll just log in with another email, no big.
    Thanks again, Chip.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Authors avatar image on their posts’ is closed to new replies.