Help Center

How to Add Likes and Display Likes Counter in Posts

How to Add Likes and Display Likes Counter in Posts

Find out how to add like or dislike counters to custom post listings using the Data Store module of the JetEngine plugin.

The Data Store module of the JetEngine plugin allows adding likes and dislikes to CPTs or posts and displays a real-time likes/dislikes counter. When users like/dislike posts, the counters automatically update without reloading the page with the listing. 

Data Store Button Widget Settings

Open the Listing template and add the Data Store Button widget.

data store button widget

Navigate to the Content tab of the Data Store Button widget and unroll it.

Select the data store (here, Likes) from the Select store drop-down menu.

Delete text in the Label field.

Add the Icon to display likes (here, the thumbnail icon from the library). If necessary, add the dislike icon in the same way.

Leave the empty Label after added to store field, but select the same Icon (for likes or dislikes) from the library (here, the thumbnail icon).

data store button settings

Heading Settings

Add the Heading widget to the Listing template. Press the “Dynamic Tag” icon near the Link field. Select the “Data Stores: Store Count” option from the drop-down menu.

dynamic tag options of the heading settings

Customize the heading by selecting its Size from the drop-down menu (Default, Small, Medium, Large, XL, XXL), HTML Tag from the drop-down menu (ranges from H1 to H6), and its Alignment (responsive).

Press the Settings icon (wrench) and select the data store (here, Likes) from the Select drop-down menu. 

 selecting data store from the dynamic settings menu

Update the template.

Front-End View

Open the page with the listing. 

listing with likes counter

The page on the front end looks as follows.

front end view of the likes counter

That’s all about adding a like or dislike counter to custom post listings using a data store.

Was this article helpful?
YesNo

Need help?

Ask Facebook community

Get answers from 22K Crocoblock Community experts from all over the world.

Start a live chat

Ask question to support agent and share its details via chat messages.