How to Display Popular Posts in WordPress: A Step-by-Step Tutorial for Beginners

Do you want to enhance your WordPress website's engagement? One effective way to engage your audience is by showcasing your most popular posts. By displaying your content based on views, you can guide visitors towards your best-performing articles, boosting both traffic and user interaction.

If you are wondering how to display popular posts on your WordPress site, no worries. There are two ways to get this job done. One is using a WordPress plugin, and the other one is doing it manually which is coding.

In this beginner-friendly guide, we'll walk you through both ways to set up and display your popular posts by views on your WordPress site. So, let's dive in!

Why Displaying WordPress Popular Posts Matters

Displaying popular posts on your WordPress site has many positive outcomes. Let's discuss some of them here:

1. Increases User Engagement

Popular posts draw attention and pique users' curiosity. Seeing what others are reading encourages them to explore more, boosting engagement through clicks, shares, and comments. This can lead to a better understanding of your target audience and their preferences.

2. Enhances Website Traffic

Popular posts act as internal magnets, guiding users from one page to another. This increases page views and overall website traffic, a crucial metric for SEO and ad revenue. When users stay longer and navigate deeper, it shows Google your content is valuable, potentially boosting your search ranking.

3. Builds Social Proof

Highlighting popular posts creates a sense of social validation. Users tend to trust content deemed engaging by others, increasing their perception of your site's credibility and reliability. This can influence conversions and subscriber sign-ups.

4. Drives Content Discovery

Showcasing popular posts helps users discover hidden gems within your archive. They might stumble upon older content they missed but would find equally valuable. This adds depth and richness to your site, keeping users coming back for more.

5. Provides User Recommendations

Popular posts serve as implicit recommendations for new visitors. They offer a curated selection of your best content, helping users find valuable information quickly and efficiently. This improves user experience and satisfaction, potentially turning them into loyal readers.

Difference Between Views and Visitors in WordPress

Sometimes, we interchangeably use views and visitors. However, both of the terms are different. In this segment, we will discuss about them.

  • Views: Views refer to the number of times a particular page or post has been loaded or viewed by users. It's a measure of how many times people have accessed that specific content on your WordPress website.
  • Visitors: Visitors, sometimes referred to as unique visitors or users, represent the individuals who access your WordPress website within a specific timeframe. Each unique visitor is counted only once, regardless of how many times they visit or how many pages they view during their session.

Here's a table comparing views and visitors in WordPress:

DefinitionTotal number of times a page or post is accessedNumber of unique individuals who visited the site within a specific time frame
CalculationCounts every instance of page/post accessCounts each unique individual only once, regardless of the number of visits or pages viewed
TrackingTracked using tools like Google Analytics or WordPress pluginsTracked using cookies or other tracking mechanisms to identify unique sessions
PurposeIdentifies popular or engaging contentMeasures the overall reach and audience size of the website
InsightsHelps understand content performance and user engagement trendsProvides insights into user demographics, geographic location, and browsing behavior

How to Display Popular Posts by Views in WordPress – 2 Ways for Beginners

This is the feature image of the blog- How to Display Popular Posts by Views in WordPress

As we mentioned earlier, you can display your most popular blogs in two ways. We'll show you both ways step-by-step here. First, let's take a quick look at the solutions:

  • Display Popular Posts Using a Plugin 
  • Display Popular Posts Manually

Now we will deep dive into each of the above-mentioned solutions. So, let's get started with the first method to show the most popular posts by views in WordPress:

Method 01: Display Popular Posts Using a Plugin 

To create this tutorial, we will use the WordPress Popular Posts plugin. If you are wondering why we have chosen this plugin. Well, we will discuss it in the next segment. Now let's start the tutorial, shall we?

Step 01: Install the WordPress Popular Post Plugin

If you already know how to install a WordPress plugin, you can skip this step. Because installing the WordPress Popular Post plugin is similar to installing any random WordPress plugin.

Navigate to your WordPress dashboard -> Plugins -> Add New Plugin, then search for the “WordPress Popular Post” plugin on the search option. Finally, install and activate the plugin from the search result.

This is a screenshot of how to install a WordPress plugin

Step 02: Add the Popular Post Block

After installing and activating the plugin, it's time to add the popular post block. To do that, go to your Widgets area from the Appearance section.

Now decide where you want to show your popular posts. In this tutorial, we are going to show it on the Main Sidebar.

This is a screenshot that shows the WordPress widgets area

So, expand the Main Sidebar and add the “WordPress Popular Posts” block.

This screenshot shows how to add the WordPress popular posts block

Step 03: Customize the WordPress Popular Posts Block

With the block in place, we can now start customizing it. Fortunately, this is straightforward as it only involves basic textbox entries and drop-down menus. So let’s quickly go through all of the options.

At the top is the Title field. Simply enter a name to help users identify what this is. For example, it can be something simple like “Most Popular Posts” or something that fits the criteria you select.

For example, say you are sorting by the most popular blog of the day.

In this case, something like “Trending Blogs Today” would be a solid choice. In any case, make sure the visitor knows what the posts are.

Below this, you will be able to select how many posts will show up. The default is 10, which may be too many entries for your widget area, so choose a value that works best for you. In this tutorial, we are going to show 2 blogs.

Next, you need to set the Criteria that the block will use to choose the most popular posts. By default, it will simply select the posts that have the most views. The other options include the number of comments and average daily views.

Then select the TIme Range. Here we are showing the most popular blogs based on All-time views. You can also set it as “Last 24 hours”, “Last 7 days”, “Last 30 days”, or “Custom”.

This is a screenshot that shows how to customize the Most Popular Posts block

You will now see the Filters section of the block. This can help you exclude certain posts or entire categories from appearing in this section.

There are other filtering options to choose from like Authors or Tags. You can also exclude individual posts if needed.

This is a screenshot that shows how to customize the WordPress Popular Posts block.

Finally, you will see a series of options that configure how the posts are displayed and if you want to display any stats alongside them. They are all just checkboxes, so simply check the box to enable or disable the features.

This is a screenshot that shows how to customize the WordPress Popular Posts block.

And with that, the block is ready to go. Click on the “Update” button to save the changes made to your widget area.

And that’s it, you can now check out your site to see popular posts being displayed.

Preview of the Most Popular Posts

Here is the preview that we have just customized.

This is the screenshot of the preview on how to display most popular posts in WordPress
Preview of the Most Popular Posts

So, this is how you can display most popular posts on your WordPress site by using the WordPress Popular Posts plugin.

Method 02: Display Popular Posts Manually

Now if you are a tech-savvy person and don't want to use a plugin to display the most popular WordPress posts on your site, you can simply do it by coding.

Here is how you can get your job done:

To start, log in to your WordPress website and navigate to Appearance -> Theme File Editor.

This is a screenshot that shows the Theme File Editor option.

Next, locate the functions.php file under Theme Functions and click on it.

Add the code snippet below at the end of the file.

function wp_display_popular_posts($num_posts = 5) {

 $popular = new WP_Query(array(
     'posts_per_page' => $num_posts,
     'meta_key' => 'post_views_count',
     'orderby' => 'meta_value_num',
     'order' => 'DESC'

 if ($popular->have_posts()) {
     while ($popular->have_posts()) {
         //To Customize the display of trending posts as needed
         echo '<h2><a href="'.get_permalink().'">'.get_the_title().'</a></h2>';


After adding the code snippet, click Update File to save your changes.

This image shows how to display popular posts in WordPress by coding

The code above uses the WP_Query function to loop through posts and filter based on post views count.

To display your trending posts, you need to call the wp_display_popular_posts function where you want to display the posts.

We’ll use the sidebar for this example. To use this option, locate sidebar.php from your theme files under the sidebar menu. Click on it and add the code below at the end of the file.

// you can change (5) to the number of posts you want to display e.g (3). 
<div class="popular-posts">
 <h3>Popular Posts</h3>
 <?php wp_display_popular_posts(5); ?>

Click the Update File button after adding the code to save your changes.

This is a screenshot that shows how to customize the sidebar by coding

You have now successfully added the popular post widget to your website without using a plugin. You can view the changes on your website’s frontend.

This image shows how to display popular posts in WordPress

That's all!

Now you know both ways to display popular posts on your WordPress site.

Bonus: Best WordPress Popular Posts Plugins

In this tutorial, we have used the WordPress Popular Posts plugin to showcase the most popular blog posts on your site. We have chosen this plugin because this is the most renowned WordPress popular posts plugin.

Also, it is the most user-friendly plugin that you can simply use without having any prior knowledge to use this type of plugin. You have already seen it in this blog how easy it is to use as a beginner.

Now let's get into the details of this plugin along with two more WordPress popular posts plugins!

  • WordPress Popular Posts
  • Display Posts – Easy lists, grids, navigation, and more
  • Top 10 – WordPress Popular Posts by WebberZone

I) WordPress Popular Posts

This is a screenshot of the WordPress Popular Posts plugin

WordPress Popular Posts is a reliable plugin designed to showcase your most popular content on your WordPress website. With its user-friendly interface and customizable settings, you can effortlessly display your top-performing posts, pages, or custom post types to engage your audience and boost your site's visibility.

Key Features

  • Pick your popularity: views, comments, or trending
  • Show off as many or as few posts as you like
  • Place them anywhere on your site

Active Installtions: 200,000+

User Ratings: 4.5/5

II) Display Posts – Easy lists, grids, navigation, and more

This is a screenshot of the Display Posts plugin

Display Posts – Easy lists, grids, navigation, and more is a versatile plugin that empowers you to effortlessly showcase your content in various formats. With its intuitive shortcode-based approach and extensive customization capabilities, you can create dynamic lists, grids, or navigation menus to enhance the presentation of your posts, pages, or custom post types on your WordPress site.

Key Features

  • Create lists, grids, and navigation menus for your content
  • Show popular posts, recent articles, or anything else
  • Super flexible and easy to use

Active Installtions: 100,000+

User Ratings: 4.8/5

III) Top 10 – WordPress Popular Posts by WebberZone

This is a screenshot of the Top 10 Popular Posts plugin

Top 10 – WordPress Popular Posts by WebberZone is a feature-rich plugin designed to help you showcase your most popular content effectively. With its intuitive interface and extensive customization options, you can highlight your top-performing posts, pages, or custom post types in various layouts to enhance user engagement and drive traffic to your site.

Key Features:

  • Top 10 hits in stylish layouts like grids and sliders
  • Customize the look to match your site
  • Show off recent or all-time popular posts

Active Installtions: 20,000+

User Ratings: 4.6/5

If you don't want to use the WordPress Popular Posts plugin, you can choose another plugin from this list. All of them are user-friendly, free, and easy to use.

Display Popular Posts on Your Site to Boost User Engagement

Displaying popular posts can surely increase your user engagement on your site. It has also positive impact on your site SEO performance. On top of that, this is a DIY task. You can easily do it all by yourself by following this step-by-step tutorial.

We have shown both ways- using a plugin and without using a plugin which is by coding to show popular blogs on your site. We have also provided the required code in this tutorial.

So, what are you waiting for? Get ready with your website and customize your site to display popular posts to enhance user engagement on your site.

That being said, if you want to share any feedback related to this blog, feel free to do that using the comment box below. We would love to know your feedback. Thank you!

Subscribe to weDevs blog

We send weekly newsletter, no spam for sure

Shams Sumon
Written by

Shams Sumon

Shams is a content writer with a passion for making WordPress topics easy to understand for everyone through conversational and storytelling approaches. With a background in the WordPress industry since 2019, he has developed a knack for breaking down complex technical concepts into digestible bites. When he's not crafting engaging content, Shams can be found watching football matches, catching up on the latest movies, or exploring new destinations to rejuvenate himself.

Have something to say? Cancel Reply

Your email address will not be published.

Table of Contents