Skip to content

Statistics & Analytics

View and interpret your post like data from the WordPress admin.

Overview

Simple Post Like includes a built-in statistics dashboard accessible from the Statistics tab on the Settings page at Settings → Simple Post Like → Statistics. It gives you a clear picture of engagement across your content without leaving WordPress admin or connecting any third-party analytics service.

The Posts list table also gets a sortable Likes column for every enabled post type, so you can rank your entire content library by engagement in one click.


Statistics Tab

Summary Cards

Three summary cards appear at the top of the Statistics tab:

CardDescription
Total LikesThe sum of all likes across every post on your site
Posts with LikesThe number of posts that have received at least one like
Most Liked PostThe like count of your single most popular post

These numbers update in real time — every like and unlike is reflected immediately the next time you load the Statistics tab.


Most Liked Posts Leaderboard

Below the summary cards, a leaderboard lists your top 10 most liked posts. Each row shows:

  • Rank badge — gold for 1st, silver for 2nd, bronze for 3rd, plain for 4th–10th
  • Post title — linked directly to the live post
  • Post type — useful when you have likes enabled across multiple post types
  • Like count — the total number of likes for that post
  • Edit link — jump directly to the post editor

The leaderboard is ordered by like count descending. Posts with equal like counts are ordered by post ID.


Likes Column in Posts List

For every post type enabled in Settings → Simple Post Like → Post Types, a Likes column is added to the Posts list table at wp-admin/edit.php.

The column shows the like count for each post inline. Click the Likes column header to sort your entire posts list by like count — ascending or descending — just like any other sortable column in WordPress.

This is the fastest way to find your least-liked content as well as your most-liked, since the leaderboard in the Statistics tab only shows the top 10.

To view the Likes column for a specific post type:

  1. Go to Posts → All Posts (or the relevant post type list)
  2. Click the Likes column header to sort

If the Likes column is not visible, click Screen Options at the top right of the list table and make sure Likes is checked.


How Likes Are Stored

Like counts are stored as WordPress post meta on each post:

Meta KeyTypeDescription
_simple_post_like_countintTotal like count for the post
_simple_post_like_usersarrayArray of WordPress user IDs who have liked the post
_simple_post_like_ipsarrayArray of SHA-256 hashed IPs for guest likes

The _simple_post_like_count key is what the Likes column and leaderboard query against. It is updated atomically on every like and unlike via the AJAX handler, so the count is always accurate.


Querying Like Data in Your Theme

You can query like data directly from post meta in your own templates or custom queries.

Get the like count for a post

php

$like_count = (int) get_post_meta( $post_id, '_simple_post_like_count', true );

Check if the current user has liked a post

php

$liked_users = get_post_meta( $post_id, '_simple_post_like_users', true ) ?: [];
$user_has_liked = in_array( get_current_user_id(), $liked_users, true );

Order a custom query by like count

php

$popular_posts = new WP_Query( [
    'post_type'  => 'post',
    'orderby'    => 'meta_value_num',
    'meta_key'   => '_simple_post_like_count',
    'order'      => 'DESC',
    'meta_query' => [
        [
            'key'     => '_simple_post_like_count',
            'value'   => 0,
            'compare' => '>',
            'type'    => 'NUMERIC',
        ],
    ],
] );

This returns posts ordered by like count, excluding posts with zero likes.


Next Steps

On This Page