• I run a blog about very local politics where there are often 5 or 6 posts from the same IP address, but each post uses a different screen name. I don’t necessarily want to ban these people from commenting, but I would like to be able to display their IP addresses so that they can’t hide behind multiple pseudonyms. Is there an easy way to do this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Sure.

    <?php comment_author_IP() ?>

    Edit your theme’s comment.php and use that.

    make sure that you are actually placing it within the comment display obviously, somewhere after <?php if ($comments) : ?>

    If you look at comments.php it’s pretty straightforward to understand.

    Remember though that this can happen legitimately. Obviously if you’ve got hundreds of screen names for one IP it’s a bit fishy, but you can have people at the same residence sharing an IP, or those behind a proxy, etc..

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to display a commenter’s IP in the Comments Section’ is closed to new replies.