If you write in the WordPress block editor, you can add a like button the same way you add a paragraph or an image: as a block. The free WP ULike plugin comes with two blocks, ULike Button and Top List, and it can also put a like button on every image in a Gallery block.
This guide shows how to use each one, with screenshots from a demo recipe site on WordPress 7.1. No code and no shortcodes.

What you need
- The free WP ULike plugin. Both blocks and the Gallery option are free.
- WordPress 6.0 or newer with the block editor. It works with block themes like Twenty Twenty-Five and with classic themes.
- Optional: WP ULike Pro for 25+ button templates, emoji reactions and dislike rankings.
Want a button on every post automatically, without adding a block each time? That is a setting, not a block. Our main guide on how to add a like button to WordPress covers it.
How to add the ULike Button block
- Open a post or page in the block editor.
- Click the + button and type “ulike” (or “like”) in the search box.
- Click ULike Button. The button appears where your cursor was.
- In the sidebar, pick a template, for example Heart.
- Click Save or Update.

The settings, in plain words
- Item Type: Posts or Comments. Leave it on Posts unless the block sits inside a comment.
- Use Current Item ID: on by default, so the button likes the post it is on.
- Custom Item ID: turn off Use Current Item ID and enter a post ID to make the button like a different post. Handy on a landing page about one recipe or product. Note that votes on a custom ID are not shown in your statistics.
- Select a Template: the button style. “Use Settings Default” follows your global WP ULike settings, so changing the style there updates every button. Pro templates show a lock until you have Pro.
- Button Type: show the template’s icon or a text label, for templates that support text.
Use it in a Query Loop or comments
The block knows where it is. Put it inside a Query Loop’s post template and every post in the list gets its own button with its own count. In a block theme you can also add it to the Comment Template inside the Comments block, set Item Type to Comments, and every comment gets a like button.
How to show your most liked posts with Top List
The Top List block shows a ranked list of your most liked content. Add it the same way, then pick what to rank in the sidebar.

- Type: top posts, comments or users. Top activities and topics appear when BuddyPress or bbPress is active.
- Status Filter: rank by likes. With Pro you can also rank by dislikes.
- Number of items to show: how long the list is.
- Period: all time, this week, this month, this year, the last X days, or your own date range.
- Filters: only some post types, or posts from certain categories.
- Customize: a heading, rank numbers, the like count, thumbnails or avatars and their size, and how long titles can be. Engaged Users adds the avatars of people who liked each item.
Colors, font size and spacing are in the block’s Styles tab, like any core block. Two Top Lists side by side in a Columns block make a nice “Reader favorites” section:

Add a like button to every image in a gallery
This one isn’t a separate block. Select any Gallery block, open the WP ULike panel in the block settings and turn on Show a like button on each image. Each image gets its own button and its own count, so visitors can like the photo they love, not just the post.

It is off by default, so galleries you already published don’t change until you turn it on.
Blocks, shortcodes or automatic display?
| You want | Use |
|---|---|
| A button on every post, page or product | Automatic display in the WP ULike settings |
| A button in one specific spot | The ULike Button block |
| A “most liked” list on a page or in a sidebar | The Top List block |
| Likes on gallery photos | The Gallery block’s WP ULike option |
| A page built with Elementor | The WP ULike Pro Elementor widgets |
| A theme file or a page builder without blocks | The [wp_ulike] and [wp_ulike_top] shortcodes (shortcode guide) |
If something doesn’t look right
- You see two buttons on a post. Automatic display already adds one. Remove the block, or turn off automatic display for that content type.
- The button likes the wrong post. Check Use Current Item ID. On a landing page, turn it off and enter the right post ID.
- Top List is empty. The period may be too short for your site. Try “All time” first.
- A template has a lock. That style is part of Pro. Pick one of the free ones, or see all templates.
Still stuck? Contact support and we’ll help.
Frequently asked questions
Yes. The ULike Button block, the Top List block and the Gallery option are all in the free WP ULike plugin. Pro adds more button templates and dislike rankings.
Install WP ULike, open a post in the block editor, click +, search for “ulike” and add the ULike Button block. Pick a template in the sidebar and save.
Yes. Add the Top List block and set Type to Top Posts. You can choose the period, the number of posts, a category and whether to show thumbnails.
Yes. You can add the ULike Button block to templates and to a Query Loop. Each post in the loop gets its own button.
Yes. Turn on Show a like button on each image in a Gallery block’s WP ULike panel. Each image keeps its own count.
It can, if automatic display is also on for that content type. Use one or the other on the same post.
Get WP ULike free · Browse templates · See Pro plans



Leave a Reply