Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $i = 0;
- global $wpdb;
- $result = $wpdb->get_results("SELECT comment_count,ID,post_title,post_excerpt FROM $wpdb->posts ORDER BY comment_count DESC LIMIT 0 , 6");
- foreach ($result as $post) {
- $i = $i + 1;
- setup_postdata($post);
- $postid = $post->ID;
- $commentcount = $post->comment_count;
- if ($commentcount != 0) { ?>
- <div class="box grid2 number<?php echo $i ?>">
- <a href="<?php echo get_permalink($postid); ?>"><?php get_image('image','138','63','thumbnail',90,null,'img'); ?></a>
- <h4><a href="<?php echo get_permalink($postid); ?>"><?php echo get_the_title($postid); ?></a></h4>
- <p><?php echo get_the_excerpt($postid); ?></p>
- <a class="more" href="<?php echo get_permalink($postid); ?>">Read more</a>
- </div>
- <?php } } ?>
Add Comment
Please, Sign In to add comment