Solution:
You might try this instead of print_thumbnail
.
<?php
if ( has_post_thumbnail() ) {
the_post_thumbnail(); // Outputs <img/> object with src="thumbnail-href"
}
Similarly, this would also work:
<?php
if ( has_post_thumbnail() ) {
echo( get_the_post_thumbnail( get_the_ID() ) );
}
If you’ve setup multiple featured image sizes in your functions.php….
<?php
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 120, 120 );
add_image_size( 'subfeature', 940, 300 );
you could reference a size in this manner (where subfeature
is the name of the size):
<?php
if ( has_post_thumbnail() ) {
echo( get_the_post_thumbnail( get_the_ID(), 'subfeature' ) );
}