Skip links

WordPress get popular posts without any plugins

How can I get most popular posts without using any plugins in WordPress.I this post will describes how to get most popular posts without any plugins.


Create a custom WordPress Query to get popular posts by limiting 10.


May be you have to displayed an error as following.
[stextbox id=”alert”]Fatal error: Call to undefined function: has_post_thumbnail() in …yourpage.php on line 32[/stextbox]
So your theme has to call add_theme_support('post-thumbnails'); in an after_setup_theme action. Otherwise the post-thumbnail functions aren’t included.
1-Go to /wp-content/themes/yourTheme folder.
2-Open the functions.php file.
3-Add add_theme_support('post-thumbnails'); at the end of the page or anywhere and save the file.
4-Reload your site.


Simply executes the mysql query and get results.


That’s only!