跳到内容

Better Recent Comments

v1.2.0

Kestrel · 2016年2月2日 上架

Provides an improved Recent Comments widget and a shortcode to display your recent comments on any post or page.

正在使用
2,000+
评分
4.8 / 5
累计下载
6.9 万
最近更新
2024年3月28日
16 条评价需要 WordPress 6.0+已测试到 6.5.15PHP 7.4+

贡献者

截图

This page shows comments added to a page using the shortcode.
This page shows comments added to a page using the shortcode.
Adding the Better Recent Comments widget to the sidebar.
Adding the Better Recent Comments widget to the sidebar.

The default Recent Comments widget is somewhat limited. Better Recent Comments improves on this by providing a more flexible widget with options to show the user’s actual comment, as well as show avatars and the ability to show or hide the comment date.

As well as the widget, there’s a handy shortcode you can use to display your recent comments. This is useful if you need to display comments somewhere other than your sidebar or footer, such as on your homepage. Simply add the shortcode [better_recent_comments].

That’s not all! The plugin is also WPML compatible, which means that the comments will be restricted to those in the current language. The default WordPress widget will list all recent comments, regardless of language, so you might end up with comments for German-language posts in the sidebar of your English site. Better Recent Comments solves this and makes sure the comments are for the current language only.

Translations currently provided in Spanish, French and Italian.

View the full plugin documentation in our Knowledge Base.

Options available with the shortcode:

  • format – the format of each recent comment. This option uses ‘placeholders’ which are substituted with the actual data when the comments are displayed. See the FAQs for details.
  • number – the number of comments to display. Default: 5 comments
  • date_format – the date and time format to use. Like WordPress, this uses a PHP date format. It defaults to ‘M j, H:i’. See this cheat sheet for a full list of date and time options.
  • avatar_size – the size of the avatar in pixels. Only used if you have included {avatar} in your comment format (see ‘format’ option). Default: 50
  • post_status – the status of posts to retrieve comments for. Defaults to ‘publish’. Can be a single status or a comma-separated list, or ‘any’ to show comments for all post statuses.
  • post_type – the post type to retrieve comments for. Accepts a single or multiple post types (e.g. ‘post’ or ‘post, dlp_document’) or ‘any’ to show comments for all post types. Default: ‘any’
  • excerpts – set to ‘true’ to show an excerpt of the comment (limited to 20 words), or ‘false’ to show the full comment. Default: true
  • replies – set to ‘true’ to also show responses to comments, or ‘false’ to only see the top level comments. Default: true

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums