Lifetime prices rise on 19 October →
Phox Elements
DYNAMIC Like buttons for Breakdance

Let visitors like any post or page with one click

Post Like adds a heart button with a live like count to your posts, pages and custom post types. Visitors do not need an account. The count is saved with the post, so you can sort a loop by the most liked content.

Works for logged-out visitors Count saved in post meta Custom icons and colours
Live demos

Click a button to like this page

All three buttons are linked to this page, so a like on one updates the others. Click again to remove your like.

Default heart

Heart with count

The built-in heart, grey until liked, then red with a small pop.
Pill button

Filled when liked

A soft pink pill that fills with red and turns the icon and count white when liked.
Custom icons

Save as favourite

Custom outline and filled star icons. Hide Zero Count keeps the number hidden until someone likes the page.
How it works

Three steps to a like button

Add it to a template once and every post gets its own count.

1

Add the element

Drop Post Like into your single post template, a post loop card or any page. It uses the current post automatically.

2

Choose the look

Keep the heart or switch on Custom Icon to pick separate icons for the liked and not liked states. Then set colours and sizes.

3

Use the count

Each like is saved to the post in the _phox_like_count field. Order a post loop by it to show the most liked posts.

Features

What you can control

A small element with the details handled for you.

One-click like and unlike

Click once to like and again to remove the like. The count updates straight away without reloading the page.

No account needed

Logged-in users are tracked in their user profile. Visitors who are not logged in are remembered with a cookie for a year.

Count saved to the post

The total is stored in the _phox_like_count post field, ready to sort or filter any loop by popularity.

Buttons stay in sync

If the same post has more than one like button on the page, they all update together.

Custom icons

Pick any icon from the Breakdance library for the not liked and liked states, such as a star, bookmark or thumbs up.

Show or hide the count

Show the number next to the icon, or hide it while the count is zero.

State colours

Set icon, count and background colours for the normal, hover and liked states.

Pop animation

The icon gives a small pop when a visitor likes the post.

Accessible button

It is a real button with aria-pressed and a Like or Unlike label, so screen readers announce its state.

Use cases

Where it works best

Anywhere you want a quick signal of what people enjoy.

01

Blogs

Add a like button to the end of every post and see which topics readers enjoy most.

02

Recipe sites

Let visitors heart the recipes they want to come back to.

03

Portfolios

Show appreciation counts on projects and case studies.

04

Most liked lists

Order a post loop by _phox_like_count to build a Most liked or Popular section.

05

Community content

Give member-submitted posts or listings a simple popularity score.

06

Help centres

Use a thumbs up icon as a simple Was this helpful button on articles.

Settings reference

Every control, explained

This is the full list of settings in the Breakdance editor, with their default values.

ControlWhat it doesDefault
Content
Show CountShow the like count next to the icon.Off
Hide Zero CountHide the count while it is zero.Off
Custom IconUse your own icons instead of the heart.Off
Inactive IconIcon shown before the visitor likes the post.—
Active IconIcon shown once the visitor has liked the post.—
Design
Background ColorButton background.—
BordersBorder, radius and shadow.—
PaddingPadding inside the button.—
MarginMargin around the button.—
Width / HeightButton size. Responsive.—
AlignmentLeft, Center or Right alignment of the icon and count inside the button. Responsive.—
Icon/Count GapSpace between the icon and the number. Responsive.6px
Icon ColorIcon colour before liking.—
Active Icon ColorIcon colour once liked.#E01B4C
Icon SizeIcon size in pixels. Responsive.24px
Count TypographyText styles for the count.—
Count ColorCount colour before liking.—
Active Count ColorCount colour once liked.—
Active Background ColorButton background once liked.—
Hover Background ColorButton background on hover.—
Hover Icon ColorIcon colour on hover.—
Tips & FAQ

Good to know

Do visitors need to log in?

No. Logged-in users are remembered in their user profile. Everyone else is remembered with a cookie that lasts a year, so they can unlike later from the same browser.

Which post does it like?

The current post in context. On a single post template that is the post being viewed. Inside a post loop, each card likes its own post.

How do I show the most liked posts?

The count is stored in the _phox_like_count post meta field. In a post loop query, order by that meta key, descending.

Does it work with custom post types?

Yes. It works with any post type, including pages, products and custom post types.

I use page caching. Is that a problem?

It can be. The count and liked state are added when the page is built, so a cached page may show an older count. Each click also carries a WordPress security token that expires after a day or so. Exclude pages with like buttons from caching, or keep the cache lifetime short.

Add Post Like to your next page

Post Like is included with Phox Elements, along with 150+ other premium elements for Breakdance.