Title: default gravatar coding
Last modified: August 18, 2016

---

# default gravatar coding

 *  Resolved [Robin](https://wordpress.org/support/users/hismuse/)
 * (@hismuse)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/default-gravatar-coding/)
 * 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](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” />](http://www.gravatar.com)
   <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; ?>

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [bdsays](https://wordpress.org/support/users/bdsays/)
 * (@bdsays)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/default-gravatar-coding/#post-373737)
 * 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.
 *  [stephenju](https://wordpress.org/support/users/stephenju/)
 * (@stephenju)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/default-gravatar-coding/#post-373738)
 * 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?
 *  Thread Starter [Robin](https://wordpress.org/support/users/hismuse/)
 * (@hismuse)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/default-gravatar-coding/#post-373739)
 * Oh ok, I can try that. What double quotes?
 *  Thread Starter [Robin](https://wordpress.org/support/users/hismuse/)
 * (@hismuse)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/default-gravatar-coding/#post-373878)
 * Yay, I got it to work, thanks for the help!!!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘default gravatar coding’ is closed to new replies.

## Tags

 * [Coding](https://wordpress.org/support/topic-tag/coding/)
 * [default](https://wordpress.org/support/topic-tag/default/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [Robin](https://wordpress.org/support/users/hismuse/)
 * Last activity: [20 years, 2 months ago](https://wordpress.org/support/topic/default-gravatar-coding/#post-373878)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
