Pli bonaj lastaj komentoj


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.

Opcioj haveblaj kun la koncizkodo:

  • 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.
  • nombro – la nombro de montrotaj komentoj. Defaŭlte: 5 komentoj
  • 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 – la grando de la avataro laŭ pikseloj. Nur se vi inkluzivis {avatar} en la aranĝo (vidu opcion ‘format’). Defaŭlte: 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’
  • eltiraĵoj – fiksu al ‘vera’ por montri eltiraĵon de la komento (limigita al 20 vortoj), aŭ ‘malvera’ por montri la plenan komenton. Defaŭlte: vera
  • replies – set to ‘true’ to also show responses to comments, or ‘false’ to only see the top level comments. Default: true


  • This page shows comments added to a page using the shortcode.
  • Adding the Pli bonaj lastaj komentoj widget to the sidebar.


  1. Alŝutu la kromprogramajn dosierojn al la dosierujo /wp-content/plugins/better-recent-comments aŭ instalu la kromprogramon rekte per la WordPressa panelo.
  2. Aktivigu la kromprogramon per la fenestro Kromprogramoj en WordPress
  3. Por aldoni la kromprogrameton, iru al Aspekto -> Kromprogrametoj kaj trovu la kromprogrameton Pli bonaj lastaj komentoj en la listo, aldonu ĝin al kromprogrameta loko.
  4. Por aldoni la koncizkodon, malfermu paĝon aŭ afiŝon kaj aldonu [better_recent_comments] kie vi volas la komentojn.


Kiel aldoni la kromprogrameton?

To add the widget, go to Appearance -> Widgets, and find the ‘Better Recent Comments’ widget in the list, then drag to any widget area. You can then set the title for the widget, the number of comments to show, and choose to show or hide the comment avatars, dates, comment text and post link.

If you would prefer to use the shortcode to set more specific options, add a Text widget to yout sidebar instead, and then add the [better_recent_comments] shortcode to your widget.

Kiel uzi la koncizkodon?

Aldonu [better_recent_comments] al iu ajn afiŝo aŭ paĝo.

Kiuj estas la opcioj de la koncizkodo?

See the main plugin description for the list of shortcode options.

How do I control the format of the comments using the `format` shortcode option?

The format option allows you to choose the exact format you want for your recent comments. This option uses placeholders which are substituted with the actual data when the comments are displayed.

The available placeholders are: {avatar}, {author}, {post}, {comment} and {date}.

  • {avatar} is the comment author’s Gravatar image.
  • {author} is the comment author’s name.
  • {post} is the title of the post, and contains a link to the author’s comment below the post.
  • {comment} is the actual comment text.
  • {date} is the comment date (see the date_format option in the main description to set the date format)

Defaults to: {author} on {post}: "{comment}" {date}

How do I set the length of the comments?

There is no built-in option for this, but you can set the length of the comments by adding the following code to your site.

In the code below change ’10’ to the number of words you would like. If you are using the [better_recent_comments] shortcode, make sure to add the excerpts="true" option.

add_filter( 'comment_excerpt_length', function( $number_of_words ) {
    return 10;
} );

Ĉu mi povas vidi ekzemplon de la kromprogramo?

Yes, please visit to see Better Recent Comments in action.

Ĉu ĝi funkcios en mia etoso?

The plugin has been designed to work with different themes and will take the styling from your theme for the fonts etc. where possible.

How do I display comments for media files/attachments?

Use the shortcode as follows:
[better_recent_comments post_type=”attachment” post_status=”any”]

Kiel uzi la kromprogramon kun WPML?

Se via retejo estas plurlingva per WPML la kromprogramo aŭtomate montras la komentojn de la ĝusta lingvo.

Ĉu vi proprigos la kromprogramon por mi?

Unfortunately not. We’ve developed this free plugin to be flexible and easy to configure so that it will be suitable for as many different websites as possible.

Where can I find the documentation?

Please visit our Knowledge Base.


Januaro 11, 2022 3 replies
The author gave a solution ( unrelated to the plugin ) to modify the comment excerpt length (*) ALL ACROSS YOUR SITE 😂 , which is not really a solution, is extremely invasive and certainly not wanted by anyone looking to build a coherent user experience on their site. Users should be able to set different excerpt lengths for each shortcode, that’s the bare minimum for any comment plugin. ( e.g. 10 words on “homepage” excerpts, 20 words on “profile page”, no limit on “all recent comments” page ). Something like that. A similar plugin : WordPress comment plus does that, but your plugin is better in terms of styling, so I’ll just have to deal with that shitty excerpt handicap for the time being. ///////////////////////////// the invasive “solution” /// add_filter( ‘comment_excerpt_length’, function( $number_of_words ) { return 50; } );
Novembro 23, 2021 1 reply
Looks perfect! Much better than the in-built WordPress widget. Well done!
Oktobro 22, 2021 1 reply
Although there are many ways to put a ‘recent column’ widget in your sidebar, this is the best. Easy to customize (read the docs for shortcode parameters), and insert a block that contains the shortcode with all of your desired options. Add a ‘<h3 class=widget-title>Recent Comments</h3>’ just above the shortcode to put a heading. Great stuff !
Julio 17, 2021 1 reply
I used the default Recent Comments plugin and was dismayed by how ugly and uninformative it was. It doesn’t show the comments! Better Recent Comments shows a nice avatar AND the actual comment. Perfect.
Februaro 14, 2021 1 reply
I have been using the plugin for more than two years, installed it on two sites – it works perfectly! A huge number of output options, in addition, there is a widget and a shortcode. Thank you very much to the developer for his great work!
Legi ĉiujn 17 pritaksojn

Kontribuantoj k. programistoj

“Pli bonaj lastaj komentoj” estas liberkoda programo. La sekvaj homoj kontribuis al la kromprogramo.


“Pli bonaj lastaj komentoj” has been translated into 12 locales. Thank you to the translators for their contributions.

Traduki “Pli bonaj lastaj komentoj” en vian lingvon.

Ĉu interesita en programado?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



Release date 27 March 2024
* Fix notices in PHP 8.2
* Misc: Update author to Kestrel


Release date 14 November 2023

  • Dev: Added the barn2 libraries
  • Dev: Tested up to WordPress 6.4


Release date 17 Aug 2023

  • Fixed warnings in PHP 8.1
  • Support multi post types


Release date 30 March 2023

  • Added support for the replies parameter in the shortcode


Release date 02 Jan 2023

  • Tested up to WordPress 6.1.1


Release date 17 June 2021

  • Fix the WPML integration to support the ‘post_type’ option.
  • Tested up to WordPress 5.7.2.


Release date 11 November 2020

  • Added ‘post_type’ shortcode option to allow comments to be shown for specific post types.


Release date 12 August 2020

  • Tested up to WordPress 5.5.
  • Added Composer support
  • Minor code improvements.


Release date 26 May 2020

  • Tested up to WordPress 5.4.1.
  • Added filter to disable inline CSS for avatars.


Release date 18 November 2019

  • Add backwards compatibility for 1.0.6 functions removed in 1.1.


Release date 18 November 2019

  • Update plugin architecture and Barn2 library code.
  • Tested up to WordPress 5.3.


Release date 20 November 2018

  • Added extra hooks for easier customization.
  • Tested with latest version of WordPress.


Release date 22 February 2018

  • Tested up to WP 4.9.2
  • Added various filters for easier developer customisation.
  • Added French translation (credit: Whiler).


Release date 14 March 2017

  • Added Italian translation (credit: Libri Ehret).
  • Tested with WordPress 4.7.
  • Other minor code improvements.


Aldonis ‘excerpts’ opcion en koncizkodon por permesi elekton ĉu uzi plenan komenton, ĉu eltiraĵon. Defaŭlte vere.


Aldonis opcion en koncizkodo ‘post_status’.


Pli bona traktado por etosoj uzante proprajn bulojn en flankpanelaj kromprogrametoj.


Unua eldono.