I have 6 posts with a featured image set for each. I have created a template file called portfolio-template.php. I have set the portfolio page to use that template file. Inside portfolio-template.php I have this minimal code:
<?php
/*
Template Name: portfolio template
*/
?>
<?php get_header(); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php the_post_thumbnail(); ?>
<?php endwhile; endif; ?>
<?php get_footer(); ?>
All I am trying to do is pull in the featured image of the posts and display it on the page. But this does not seem to work. The page is blank. I don't know what I am doing wrong but it is probably something simple. Any help will be greatly appreciated.
Thanks