Big the biggest challenge of blogger is to retain readers in their blog. One of the best technique to do this showing the most popular posts or related posts on the site where user is bound to see it. Keep this just below the current post may increase the chance of user seeing it. The reason to choose popular ones is because there might be a reason for it to be popular. So the chance for the reader like it is more.
Getting the Popular Post
Just copy & paste this piece of code where you want the list to display:
Getting the Popular Post
Just copy & paste this piece of code where you want the list to display:
$pop = $wpdb->get_results("SELECT id, post_title, comment_count FROM {$wpdb->prefix}posts WHERE post_type='post' ORDER BY comment_count DESC LIMIT 10");
foreach($pop as $post) : ?>
- post_title; ?>
Comments
Post a Comment