I have added Featured image support for my posts by adding the following in the functions.php
add_theme_support('post-thumbnails');
I created 3 posts with Featured Image and i want to display them on the homepage as show in the Read Section in this link http://play.mink7.com/sophiance/
I am trying to do the following to get my posts.
$args = array(
'post_type' => 'post',
'posts_per_page' => 3,
'order' => 'asc'
);
$home_shows = new WP_Query($args);
// var_dump($home_shows);
echo "<pre>";
print_r($home_shows->posts);
echo "</pre>";
I am trying to fetch the Featured Image using the following syntax.
$page = get_page(1);
print_r($page);
if ( has_post_thumbnail() ) {
the_post_thumbnail(array(486,226));
}
the_content();
Now i am not sure how to call the featured image to the posts i have queried at the top. as the content is already fetched before am calling the featured image.