WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Recent Comments

Creates functions to assist in displaying a list of the most recent comments.

Configuration

You may pass parameters when calling the function to configure some of the options. Parameters are accepted only in the query-string-style.

list_most_recent_comments()

In addition to the parameters that get_comments() and get_most_recent_comments() (see below) accept, this function accepts the following parameters:

  • excerpt_words -- The number of words from the comment to display
  • excerpt_chars -- Or alternately the number of characters from the comment to display
  • comment_format -- Allows you to pick from two predefined display formats:
  1. Comment Author on Post Title
  2. Comment Author: This is the comment excerpt

Example:

<?php list_most_recent_comments( 'excerpt_words=5' ); ?>

get_most_recent_comments()

A more powerful version of get_comments(). It accepts the same parameters as well as the following ones:

  • passworded_posts -- Boolean to control showing comments on passworded posts or not. Defaults to false.
  • showpings -- Boolean to control showing pings and trackbacks or not. Defaults to false.
  • post_types -- Array of post types to include comments from. Defaults to posts and pages: array( 'post', 'page' )
  • post_statuses -- Array of post statuses to include comments from. Defaults to published posts and static pages: array( 'publish', 'static' )

Arguments should likely be passed as an array instead of a string.

Example:

<?php

list_most_recent_comments( array(
    'showpings' => true,
    'post_types' => array( 'post', 'page', 'foobar' ),
) );

?>

Last Updated: 2009-6-29
Downloads: 24,091

Ratings

3 stars
3.9 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
1 person says it's broken.

0,1,0
0,2,0
0,2,0
33,3,1
33,3,1
0,3,0
0,2,0
100,1,1
100,1,1
33,3,1
100,1,1
0,1,0