For some reason I can't seem to get this small block of code to work. I'm trying to show the most recent post with it's content and thumbnail. I had no problem displaying the title and content, but the thumbnail just won't show.
So this is in my template:
<?php
$args = array( 'numberposts' => '1' );
$recent_posts = wp_get_recent_posts( $args );
foreach( $recent_posts as $recent ){
echo '<h5>' . $recent["post_title"].'</h5> ';
echo '<br />';
echo '<p>' .$recent["post_content"].'</p>';
echo '</div>';
echo '<div class="left">';
if (has_post_thumbnail()){
echo 'the_post_thumbnail';
}
echo '</div>';
}
?>
And of course I have this in functions.php
add_theme_support('post-thumbnails');
Any Ideas? Thanks