Surbma | Recent Comments Shortcode

A simple shortcode to display recent comments. You can use it in text widgets or with every shortcode enabled page builder.
The shortcode:
[recent-comments]
[recent-comments number=”10″ author=”” title=””]
There are seven parameters for this shortcode:
- author__not_in – Author ID to exclude from the list. Default: NULL to list all comments from all authors.
- number – Number of comments to return. Leave blank to return all comments. Default: 5
- order – How to sort comments: ‘ASC’ (Ascending – lowest to highest) or ‘DESC’ (Descending – highest to lowest). Default: DESC
- author – Do you want to hide the author? Just give an empty parameter: author=””
- title – Do you want to hide the title? Just give an empty parameter: title=””
- excerpt – Do you want to hide the excerpt? Just give an empty parameter: excerpt=””
- morelink – You can specify the text of the more link. Do you want to hide the more link? Just give an empty parameter: morelink=””
There is no mandatory parameter, you can use the shortcode as is.
IMPORTANT! This (or any other) shortcode is working only in a widget, if you or the theme has enabled the use of shortcodes in widgets. I’m not giving any description how you can do it, because there are a lot of posts out there. You can do a search for this: wordpress enable shortcodes in widgets
Download & install the zip archive
The plugin package installer can be downloaded from the WP2E project tab called “code”.
1 – Select the version to download if this option is available otherwise the “latest” version of the main plugin will be used.
2 – After downloading the zip archive install the plugin package installer in you local environment and activate the script from the plugin list.
3 – Under the section “Plugins” of the admin dashboard you should see a new “Dependencies & Licenses” link. Follow the instructions from this panel to finalize the installation of the missing dependencies.
- Give a name to your project
- Download the Installer Package
- Install & activate the plugin locally
- Install the suggested dependencies
Tips: Use the WP2E panel to add/suggest new dependencies to the local installation. Press F5 in the list of dependencies if the changes are not displayed right away.



