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!
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.
You must log in to post.