Featured Comment Block lets you pull a reader’s comment into your post as a styled callout. Pick a layout, search for the comment, and it’s in. Great for showing off a glowing review right where new readers will see it.
Before you start
- WordPress 5.8.3 or later
- PHP 5.6 or later
- An active license. The block only loads once the plugin’s license is activated.
Install
- In your WordPress dashboard, go to Plugins → Add New Plugin.
- Click Upload Plugin.
- Choose the plugin zip file.
- Click Install Now.
- Click Activate, then finish activating your license when prompted.
How to use
Feature a comment
- Open a post or page in the block editor.
- Click + and add the Featured Comment block.
- Click Choose to pick a pattern (the layout). A Choose a pattern window opens; click the one you like.
- In Search a comment, type a few words from the comment you want. Matching approved comments appear below.
- Optional: turn on Scope comments to current post to only search comments left on this post.
- Click the comment to feature it.
The search covers approved comments from your whole site, so you can feature a comment from another post too. Scope comments to current post only appears once the post has been saved at least once.
Change the comment or the layout
- To pick a different comment, select the block and click Edit selected comment (the pencil) in the toolbar.
- To switch layouts, click Replace in the toolbar and choose another pattern. Your selected comment carries over.
Customize the layout
Inside the block, you can rearrange or add WordPress’s comment blocks: Comment Content, Comment Author Name, Comment Date, Comment Reply Link and Comment Edit Link. You can also add regular blocks like headings or paragraphs. The block itself supports color, spacing, border, layout and alignment settings in the sidebar.
Block options
Built-in patterns
- Basic: the comment text with the author’s name below, both centered.
- Border: a rounded, bordered box with a “Reader Love” heading, the comment, the author’s name and their avatar between two separators.
- Color Quote: left-aligned with a colored bar on the left, the comment, the author’s name and a small “Loyal reader” line.
The “Reader Love” and “Loyal reader” text are regular paragraphs, so edit them however you like.
Toolbar
- Edit selected comment: reopens the comment search.
- Replace: opens the pattern picker.
Add your own patterns
Any block pattern registered for the small-plugins/featured-comment-block block type shows up in the pattern picker. A theme or plugin can add one with register_block_pattern(), for example:
register_block_pattern(
'my-theme/featured-comment-simple',
array(
'title' => __( 'Simple', 'my-theme' ),
'blockTypes' => array( 'small-plugins/featured-comment-block' ),
'content' => '<!-- wp:small-plugins/featured-comment-block -->
<div class="wp-block-small-plugins-featured-comment-block"><!-- wp:comment-content /--><!-- wp:comment-author-name /--></div>
<!-- /wp:small-plugins/featured-comment-block -->',
)
);
Developer reference
Coming soon: the hooks, filters and functions you can use with this plugin from your theme or a code snippet.
FAQs
What happens if the featured comment is deleted?
The block just disappears from the front end. Nothing broken shows up. The same goes for a block where you never picked a comment.
Can I feature a comment that’s still pending?
No. The search only shows approved comments. Approve it first, then search again.