Support » Fixing WordPress » Loop for Popular Post Title and Thumbnail Display

  • Hey Ya’ll,

    I’m attempting to implement a popular post loop that displays both the post title and thumbnail. Here is what I have so far:

    [code moderated – please use the pastebin]

    Any help would be greatly appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Sorry..trying this code again…

    <ul style=”width=640px; list-style-type:none;”>
    <?php
    $result = $wpdb->get_results(“SELECT comment_count,ID,post_title, post_date FROM $wpdb->posts WHERE post_date BETWEEN ‘2010-01-01’ AND ‘2011-12-31’ ORDER BY comment_count DESC LIMIT 0 , 8”);

    foreach ($result as $topten) {
    $postid = $topten->ID;
    $title = $topten->post_title;
    $commentcount = $topten->comment_count;
    if ($commentcount != 0) {
    ?>
    <li style=”font-size:11px; float:left; height:225px; margin: 10px 5px 10px 5px; padding: 0 0 0 0; width:140px;”>“><?php echo $title ?> (<?php comments_number( ‘0’, ‘1’, ‘%’ ); ?>)
    <?php }
    }
    ?>

    bump…truly need help with this if you could.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Loop for Popular Post Title and Thumbnail Display’ is closed to new replies.