Support » Plugins » Where to put gravatar line?

  • I installed WP Gravatar Signup v1.5 from uploaded to the plugin folder, activated the plugin, made /gravatar-signup/gravatar-cache.txt writable, put this <?php show_gravatar_signup(); ?> in comments.php, and now I have to put this line somewhere:

    <img src=”<?php gravatar(“R”, 40, “”, “FF0000″); ?>” alt=”” />

    But where ? 🙂

Viewing 15 replies - 1 through 15 (of 26 total)
  • nobody knows ?

    In general, the call for a plugin should be put into the file where you want the plugin output to appear.

    I found these posts on gravatars in the forum. Some of them mention where the code goes:


    That Plugin author’s instructions say nothing special has to be done in 1.5 after activating, unless your Theme requires it. Seems like the Plugin is working on your site though I didn’t register completely.

    I followed the advice from those topics and placed the line here:

    <?php if ( $comments ) : ?>
    <ol id=”commentlist”>
    <?php foreach ($comments as $comment) : ?>
    <li id=”comment-<?php comment_ID() ?>”>
    <div class=”clearer”> </div>
    <div class=”commentname”>
    <span class=”commentauthor”>
    <img src=”<?php gravatar(“R”, 40, “”, “FF0000″); ?>” alt=”” />
    <?php comment_author_link() ?>

    But instead of the avatars, I get this error when I go to the articlepage where the comments stand.

    So either the line is wrong or the place where I put it is wrong.
    Anybody understand the error?


    Jeroen Stooker

    Fatal error: Call to undefined function: gravatar() in /home/stooker/public_html/wp-content/themes/rin/comments.php on line 21

    ps. look at down below if you want to see the problem.

    Jinsan, you’re not registred and still see your gravatar on my site and no error? 😐 Strange?

    Are you sure you activated the plugin?

    yep completely sure, but activated or deactivated it doesn’t matter the error stays there.

    Maybe I should try another gravatar plugin, altough I got the feeling it’s just the placing of that line.

    make sure there are no blank spaces before or after your php tags in the plugin file. That can sometimes cause WordPress not to read it properly

    You mean in comments.php ? I remowed the spaces before and after

    <img src=”<?php gravatar(“R”, 40, “”, “FF0000″); ?>” alt=”” />

    But still the same error.

    No, I mean in the plugin file itself. If you have any spaces at the beginning or end of the file it can mess things up

    The Gravatar-singup plugin simply adds a checkbox that users can check when they comment on your website to create their own gravatar.

    To actually show commeter’s gravatar, you need the ‘gravatar’ plugin which houses the gravatar(); call. The Signup plugin doesn’t display it for you.

    You need 2 plugins here to accomplish the two distinct tasks.


    There you go…I see your comments now

    OOOooooohhh…You don’t have the gravatar plugin, just the signup one…that should explain it then. Good catch Cypher

Viewing 15 replies - 1 through 15 (of 26 total)
  • The topic ‘Where to put gravatar line?’ is closed to new replies.