WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/comment author IP

Description

Displays the comment author's IP address. This tag must be within The Loop, or a comment loop.

Use get_comment_author_IP to retrieve the value.

Usage

 <?php comment_author_IP($comment_ID); ?> 

Example

Posted from: <?php comment_author_IP(); ?>

Parameters

comment_ID
(integer) (optional) The ID of the comment for which to print the author's IP address.
Default: None

Changelog

  •  ? : Added the 'comment_ID' parameter.
  • Since: 0.71

Related

Comments Functions

See also index of Function Reference and index of Template Tags.