WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] default gravatar coding (5 posts)

  1. Robin
    Member
    Posted 8 years ago #

    I have lovely default gravatars for each of my themes but I can't seem to get them to show up right. Here is the basic code for them all but each have a different gravatar_00 by number.

    http://fragilemusings.net

    Thanks!

    <?php if ( $comments ) : ?>

    <?php foreach ($comments as $comment) : ?>
    <div class="commentbox">
    <div class="commentid">
    "><?php comment_ID(); ?> </div>
    <img src="<?php gravatar("R", 60, "/gravatar_04.png", "704a25" ); ?>" alt="Get your own gravatar for comments by visiting gravatar.com" class="gravatar" />
    <p class="commentby"><?php comment_type(__('Comment'), __('Trackback'), __('Pingback')); ?> <?php _e('by'); ?> <?php comment_author_link() ?>
    <p class="commentinfo"><?php comment_date() ?> @ <?php comment_time() ?> <?php edit_comment_link(__("Edit This"), ' |'); ?>
    <?php comment_text() ?>
    </div>

    <?php endforeach; ?>

  2. bdsays
    Member
    Posted 8 years ago #

    There are more than one gravatar plugins floating around in the web. You might want to check which one is it compatible with by checking the arguments in the function calls.

  3. stephenju
    Member
    Posted 8 years ago #

    I think you need to specify a full URL to your deafult avatar.

    Don't you also need to escape those double quotes in the double quoted string?

  4. Robin
    Member
    Posted 8 years ago #

    Oh ok, I can try that. What double quotes?

  5. Robin
    Member
    Posted 8 years ago #

    Yay, I got it to work, thanks for the help!!!

Topic Closed

This topic has been closed to new replies.

About this Topic