A WordPress widget that gives you unprecendeted control over displaying your comments loop and comment form.
The Comments Loop and Comments Form widgets are basically an abstraction of the comments.php file. The Comments Loop widget makes use of the
wp_list_comments() template tag to generate the custom loops. You can see a list of arguements at the wp_list_comments() codex page. Both widgets make strategic use of action hooks and filters for advance customization.
comments_meta in the Comments widget section may contain shortcodes.
In addition, the Comments Loop widget comes bundled with:
[author]- Displays the author of the post.
[date]- Displays the date the post was published.
[time]- Displays the time of day the post was posted.
[link]- Displays the comment's permalink.
[reply]- Displays the reply link.
- Displays the edit link.
All shortcodes have before and after parameters. For instance, adding a seperator before the edit link would be:
[edit before="| "]. In addition, the
[link] shortcodes have a label parameter to customize the actual text (e.g.
[link label="Permalink"]). To customize the text for the
[reply] shortcode, use reply_text and login_text.
The Comments Loop has several action hooks available throughout the loop process:
before_$comment_type_div- Before the opening of the
$comment_type_pagination- Right after the pagination links
before_$comment_type_list- Before the comments loop
before_$comment_type- Within the loop of $comment_type, right after the opening tag.
after_$comment_type- Within the loop of $comment_type, right after the closing tag.
after_$comment_type_list- After the comments loop
after_$comment_type_div- After the closing of the
$comment_type to be the value of the widget's
type parameter (e.g. comment, trackback, pingback, pings).
In addition, it also has several filter hooks where you can modify the function's output:
cl_comment_meta- The text of the
cl_comment_author- The post author
cl_comment_date- The date the comment was posted
cl_comment_time- The time of day the comment was posted
cl_comment_count- The comment count
cl_comment_link- The permalink for the comment
cl_comment_reply- The reply link
cl_comment_edit- The edit link to edit the comment.
The Comments Form has several action hooks available:
comment_form_before- Before the
comment_form_must_log_in_after- After the
comment_form_top- After the opening form tag
comment_form_logged_in_after- After the
comment_form_before_fields- Before the input fields
comment_form_after_fields- After the input fields
comments_form- Before the closing form tag
comment_form_after- After the
comment_form_comments_closed- After the
Requires: 2.9 or higher
Compatible up to: 2.9.2
Last Updated: 6 years ago
Active Installs: 10+
Got something to say? Need help?