• Resolved mindkil

    (@mindkil)


    Hello,

    I would want to change the field of the default url, that commenters could write their country in it instead of their homepage. And I want to list the country besides the name of the commenter (“User” from “Country”). I found these codes, but it doesn’t work.
    In comments.php:

    <p><input type="text" name="country" id="country" size="22" />
    <label for="country"><small>Country</small></label></p>

    In functions.php:

    <div class="comment-author vcard">
    <?php echo get_avatar($comment,$size='48',$default='<path_to_url>' ); ?>
    <span class="commenter-name"><?php comment_author_link(); ?></span> from <span class="commenter-name"><?php print $comment->extra_country; ?></span>
    </div>

    Any suggestions?

    Thanks,
    gas

Viewing 2 replies - 1 through 2 (of 2 total)
  • If you install firestats, that plugin has an option to show people’s country of origin automatically in their comments and as an added bonus you get all kinds of cool analytics data about your users.

    Thread Starter mindkil

    (@mindkil)

    OK, thanks, the firestats flag seemed OK for my client.
    I would have prefered the new custom-field menu, but this will also do the job.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom field (instead of url) in the comments’ is closed to new replies.