Support » Fixing WordPress » Commenters are anonymous on home page, but ok elsewhere

  • Hey, all — I’ve found similar problems to this, but none exactly.

    I’m using 2.0.4 and just imported my blog and comments from Movable Type. I created my own theme so WordPress basically powers my site.

    On my home page, I have a section that lists the latest 20 comments to any entry on the blog. I get this using a template I called “latest-comment.php.”

    Problem: Every commenter there is listed as Anonymous. But if you go to the entry itself, all the commenters are listed correctly — it’s only in the latest-comment file that they’re all Anonymous.

    Here’s the code from my latest-comments.php:

    <?php rewind_posts(); ?>
    <?php $my_loopcount = 0; ?>
    <?php if (have_posts()) : while ((have_posts()) && ($my_loopcount < 21)) : the_post(); ?>
    <?php $my_loopcount++; ?>

    <p style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size:11px;">
    In [a href=" <?php the_permalink(); ?> "]<?php the_title(); ?></b>

    From <?php comment_author_link() ?>

    <?php endwhile; else: ?>
    <?php _e('Sorry, no posts matched your criteria.'); ?>
    <?php endif; ?>

    (Note: I put one link in square brackets so it appeared properly here.)

    * * *

    You can see the result (the site in progress) at

    Any ideas would be more than welcome. Thanks!


Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Commenters are anonymous on home page, but ok elsewhere’ is closed to new replies.