I’m trying to display the three most recent posts with thumbnail images (50x50) within a custom HTML code. I need to display only the thumbnail images, the dates and post titles. The resulting HTML output should look something like this:
[code]
- '.
Oct 29, 2012
Post Title 1 - '.
Oct 28, 2012
Post Title 2 - '.
Oct 27, 2012
Post Title 3
I didn’t think that this would be too difficult, but it doesn’t seem to work. Here is what I have tried:
[code]
-
<?php
$args = array(
'posts_per_page' => 3,
'nopaging' = true
);
$tyler_query = new WP_Query( $args );
while ( $tyler_query->have_posts() ) : $tyler_query->the_post();
echo '
- '.
''. the_post_thumbnail(). ''. ''. the_date(). '
'. ''. get_the_title(). ' ';
endwhile;
wp_reset_postdata();
?>
Any help would be greatly appreciated. Thanks.