Popular Posts List in Wordpress

In this article we will cover How to show Popular Posts List in Wordpress Blog. Popular Posts Widget is a great way to have your most useful articles right there in the sidebar of you application.

By having a Popular Posts Block, your audience are more likely to visit more useful content available on your site, which in turn increase your page views and decreases the bounce rate.

We will be using Wordpress Popular Posts plugin to accomplish the task.

Alright let's dive into the steps.

Install and Activate the Plugin

The first step is to Install and Activate the Wordpress Popular Posts Plugin. Login to your wordpress admin.

In the wordpress dashboard, Go to Plugins -> Add New

Search for 'Wordpress Popular Posts'.

wordpress popular posts plugin

Go ahead and Install and Activate the plugin

Once the plugin is activated it will create a new Menu under your Wordpress Dashboard -> Settings with name Wordpress Popular Posts.

This plugin tracks the number of views on your posts and pages to rank them as popular. When you first open the Wordpress Popular Posts plugin page, you will find that there are no pages or posts to be ranked in popular posts since initially all the posts have 0 views.

Visit some pages of your blog.This way the views will get recorded in the wordpress popular posts plugin and you can start testing it.

The options available in Wordpress Popular Plugin are straight forward.

Wordpress popular plugin options stats tools etc.

Stats: Stats shows you the number of views for your different posts and pages.

Tools : Here you get option to customize the content that needs to be included in the popular posts data.

Parameters : The parameter page shows you the different arguments that can be passed to the function provided  by the plugin to customize the output data from Wordpress Popular posts.

There are three ways by which you can make use of the plugin.

Display Popular Posts directly in your theme using function

Go to your theme page (usually sidebar) where you are looking to display the popular posts data. And add following script.

                            <?php
                            $args = array(
                                'wpp_start' => '<ul class="list-group list-group-flush">',
                                'wpp_end' => '</ul>',
                                'post_html' => '<li class="list-group-item"><a target="_blank" href="{url}">{text_title}</a></li>',
                                'stats_views' => 0,
                                'limit' => 6
                            );
                            wpp_get_mostpopular( $args );
                            ?>

I have modified the arguments to cater the needs to Bootstrap design. You can look into the parameters and adjust the output data according to your needs.

With some CSS my Popular Posts sidebar box looks like this

popular posts 5balloons

Display Popular Posts using Widget

You can display Popular Posts on your pages using WPP widget too.

Login to your wordpress dashboard

Go to Appearance -> Customize -> Widgets -> Add a Widget

Check for Wordpress Popular Posts. Add the widget to desired location and you can customize the output data of Popular posts using the widget form.

widget wordpress popular posts

Customize the data in the form, Apply the changes and hit Publish

 

Display Popular Posts using ShortCode

If you are looking to display Popular Posts using a shortcode, you can paste the following script at the desired location.

<?php

echo do_shortcode("[wpp header='Popular Posts' header_start='<h3 class="title">' header_end='</h3>']");
?>

 

That's it, It's very easy to display popular posts list in wordpress blog.

Comments