Support » Fixing WordPress » Comment author name/gravatar link works for visitors but not me

  • Resolved lutetia


    Hi all,

    I’m using the WP-Gravatar plugin for gravatars on my site.
    When someone leaves a comment, their name and gravatar link back to their site (if URL info entered).
    However, when I leave a comment on my own site, either when logged in or logged out, my own name and gravatar do not display a link back to my site, despite having entered the URL information.

    My discussion settings are set to enable gravatars and link to author’s site.
    So I don’t understand why it works for visitors but not for me.

    Any ideas and suggestions much appreciated.

    An example is here.

Viewing 15 replies - 1 through 15 (of 20 total)
  • Do you have a gravatar account? Are you using the same email address on your site that you used for your gravatar?

    Thank you Esmi, I do have a Gravatar account, and I had registered my website address on it, but it wasn’t set as my “primary” email address. I just changed that and thought it was fixed….
    But it only works if in WP-Gravatars settings I check the box that says “Gravatars and name for users with no given blog/url link will be linked back to: www.”

    I’d rather not enable that option, but if I uncheck that box, I’m back to no linking for my own name and gravatar.

    Have you tried not using the WP-Gravatars plugin?

    Yes, orginally I didn’t use it, but Gravatars weren’t showing up at all. Maybe I should deactivate WP-Gravatars and try again.

    I’ve not had any problems with using the default gravatar settings in Settings/Discussion.

    Thank you, that’s helpful. I’m going to remove this plugin and try the default settings once again.

    I deactivated WP-Gravatars, then checked to make sure avatars were enabled in the discussion settings, including identicons for users with no avatars, but now no avatars/gravatars are showing at all, as before….

    Just looking at the codex and it says some themes are not gravatar-enabled. I suspect that may be the case with theme I’m using, ProSense.

    The doc says this calls the Gravatar:

    echo get_avatar( $id_or_email, $size = ’96’, $default = ‘<path_to_url>’ );

    But I have no idea where to put it, and whether I need to add any other code elsewhere.

    Just noticed that the gravatars show up alongside the edit comments area in the dashboard, just not on the comments following the actual posts…

    For anyone having the same problem, I found some useful instructions on how to enable gravatars here:

    Gravatars are now showing, and names are linking, but the gravatar images themselves are still not linking to the authors’ websites.

    Does anyone know how to enable gravatar image linking?

    I’ve posted my comments.php code here.

    How about:

    <?php if(function_exists('get_avatar')) { echo '<a href="' . get_comment_author_link() .'">' . get_avatar($comment, '40') .'</a>';} ?>

    Thanks Esmi… I’ve just inserted that code – there’s some linking happening, but it’s not to the author site, rather to the author URL appended to the page URL…..

    Maybe I didn’t insert it correctly. I replaced this line:

    <?php if(function_exists(‘get_avatar’)) { echo get_avatar($comment, ’40’); } ?>

    with the code you provided.

    Here’s where the link on a gravatar leads to:


    Oh – that’s weird. I’m using get_comment_author_link() on one of my sites to link the commentator’s name back to their site and it works fine. It should have worked with your gravatar image too. Sounds you did add it in exactly the right place too.

    Do you have other plugins installed? Can you post a link to a page with this on?

    Here’s a link to a page with some comments where you can see what’s happening.

    I have other plugins installed (22 of them), but no other gravatar or comments plugins.

    These are the plugins I’m using.
    AddtoAny, Advanced Excerpt, Akismet, All-in-one-SEO, Better Blogroll, Category Posts Widget, Contact Form ][, Frame Buster, Google Analytics, Google XML Sitemaps, Maintenance MOde, Page Excerpt, Page Lists PLus, Page Tagger, RSS Footer, RSS Icon Widget, Stray Random Quotes, TS Custom Widgets, WordPress Stats, WP-CMS Post Control, WP-Print, WP-Super Cache

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Comment author name/gravatar link works for visitors but not me’ is closed to new replies.