List the most popular wordpress posts according to comment count

May 23, 2010

If you want to have a section on the home page where you list the most popular posts of the month, according to comment count. it’s always best to write the code yourself if you can. Once we learn how to query WordPress database, tasks like this become easy. To query WordPress database, we can use the $wpdb->get_results() method. As the parameter, we simply pass a SQL query. In this particular example, let’s say that we only want to display a list of popular posts within our sidebar. We can use the following... [Read the full story]

Display most popular content in wordpress sidebar

March 26, 2009

Highlighting the most popular posts on your site is a great way to send new visitors to your very best content and win them over. What about giving them a quick access to your most commented posts? There are a few different ways you can do this, and quite a few plugins out there to help. What we’re going to do is quite simple, we will set up a query to get an ordered list of your most commented posts from your database, and then display those any way we like. Setting this up as a sidebar widget is very easy. Just copy... [Read the full story]