• Hi,

    I’m working on a design for my weight loss blog in my sandbox.

    I’m using the Blix theme which had gravatar code that didn’t appear to be working so I pulled over the code I know is working on my personal blog.

    However, it appears to be doing the default image and not picking up the comment author email which is definitely there.

    <?php if (function_exists('gravatar')) {
    if ('' != get_comment_author_url()) {
    echo "<a href='$comment->comment_author_url' title='Visit $comment->comment_author'>";
    } else {
    echo "<a href='http://www.gravatar.com' title='Create your own gravatar at gravatar.com!'>";
    }
    echo "<img height='80' width='80' src='";
    if ('' == $comment->comment_type) {
    echo gravatar($comment->comment_author_email);
    } elseif ( ('trackback' == $comment->comment_type) || ('pingback' == $comment->comment_type) ) {
    echo gravatar($comment->comment_author_url);
    }
    echo "' alt='a gravatar' class='gravatar' /></a>";
    } ?>

    Can someone see what’s wrong and point it out to me?

Viewing 1 replies (of 1 total)
  • Thread Starter nmallory

    (@nmallory)

    OK I got it to work by taking out the comment_type check. I’m curious why it works on one blog and not the other though

Viewing 1 replies (of 1 total)

The topic ‘Gravatar Weirdness…same code — different results’ is closed to new replies.