Skip to main content




Show the most popular post of your WordPress blog is a great way to increase the readers' permanence on your website. In CourseWpress.com you will learn how to do it.

The bloggers and webmaster We always seek that: that visitors never leave our sites that go from one post to another. We like Google and we like it too.

How to display the most popular posts on your WordPress blog without plugins?

There are different methods to show the post more popular of your WordPress blog. Here we show you all.

We will start by learning to show the most popular posts no need to install plugins.

To achieve this we will work with code.

Warning

Working with code can sometimes be a matter delicate. Before working with code and modify files of your website, it is recommended create a backup of your WordPress installation.

Calm. If you still don't know how support: In this complete tutorial we show you how to create a backup or back up in WordPress.

Once the warning has been made and all the provisions of the case have been taken, we continue.

Showing the most popular posts of your WordPress blog without plugins

  1. Select the following code:

<h3>Posts

más populares</h3>

    get_results («SELECT

    comment_count, ID, post_title FROM $wpdb-> posts ORDER BY comment_count

    DESC LIMIT 0, 5 »); //SUBSTITUTE 5 FOR THE NUMBER OF POSTS TO SHOW

    foreach ($result as $post) {

    setup_postdata ($post);

    $postid = $post-> ID;

    $title = $post-> post_title;

    $commentcount = $post-> comment_count;

    if ($commentcount! = 0) {?>

    <li><a 1000»

    title = » »>

    <?php echo $title ?></a> {<?php echo $commentcount

    ?>}

  1. Copy it and paste it into a text editor act for tasks of programming. Forget about memo pad that comes by default with your computer. When it comes to formatted code nothing like: Notepad ++, SublimeText or similar apps. We recommend the first one for being reliable and at the same time free.
  2. Once you have the code in your text editor we can modify.
  3. You can change the qualification wave post quantity popular to be displayed.
  4. Then made the desired modifications, we keep our code in reserve. We will use it shortly.
  5. Now we stand at our WordPress admin panel.
  6. And we follow the following route: Appearance> Editor > and select "Sidebar" or "Sidebar.php”.
  7. We return to the text editor, select and copy our code.
  8. We paste the code in sidebar.php
  9. Clever.

You must bear in mind that according to the theme that you have installed or the version of WordPress that you use, the code that we provide may not work.

But in that case there is no drama.

We can turn to plugins.

How to display the most popular posts on your WordPress blog with plugins?

Show the most popular posts with plugins it's easy. More if you are an advanced user you will know how to search and install a hassle free plugin.

In case you need it, we prepare a complete tutorial with which you will learn to install plugins in WordPress step by step.

And at the same time we share with you:

The best WordPress plugins to display the most popular posts

WordPress Popular Posts

WordPress Popular Posts

In the section of showing popular plugins, there are surely a few and WordPress Popular Posts is the most used. More of 300.000 Active installations make this plugin the more popular among the popular.

One of the options that distinguish of the rest of the plugins in the same section is that it is compatible with the comments generated in Disqus.

By installing it, you can choose to display the most popular articles with different time ranges: the last 24 hours. The last 7 or 30 days.

  • You can add different Widgets from WordPress Popular Posts with different options and popularity criteria (time ranges, comments, shared)
  • Unfolds thumbnails of the entrances
  • It has a panel statistics
  • Highly customizable.

At the same time is gratuitous. And it is available for download and installation in the repository plugins WordPress.

Top 10

Top 10

Which Top 10 It does is count the amount of views and reactions your blog entries get. Then, attending to that count, it shows the most outstanding ones.

It has a panel where it shows the advanced post statistics.

At the same time admits the personalization of the thumbnails. And it has different levels of ticket exclusion. Which will allow you to select at all times which entries in your blog to highlight and which entries to leave out of the top. For this you can use criteria like categories or direct exclusion.

Stylish Popular Posts

Stylish Popular Posts

Stylish Popular Posts is one of those plugins that stand out for their simplicity. But don't let that same simplicity fool you. If you need to show your most popular items on your WordPress website without complicating it, Stylish Popular Posts is your plugin.

  • You choose the amount of post to show
  • At the same time you can configure the thumbnails of each post to your liking.

If you need to continue learning everything about the best web content manager and be an expert, you can sign up for the best online WordPress course in Spanish.