- This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- The forum ‘Back End’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Anyone successfully use the_post_thumbnail when using query_posts in WordPress? I’m working on this right now, and I can’t get the images to show at all.
I’ve added the appropriate code to the functions.php file –
set_post_thumbnail_size( 194, 155, true ); // Theme post thumbnails
add_image_size( 'article-post-thumbnail', 281, 162 ); // Article thumbnail size
add_image_size( 'mini-post-thumbnail', 80, 80 ); // Mini thumbs
?>
And here is the code I’m using for my posts :
Everything is working A-OK aside from the_post_thumbnail() :( Do I have to somehow modify the way I call it since I’m using query_posts?
Any help would be super awesome!
Thanks,
Lindsey
Echo?
Try this for chuckles…
Do you have a live example? I’ve used <?php the_post_thumbnail();?> quite a few times and I’ve never had a problem.
“showposts” is deprecated, try posts_per_page
I don’t know if this will have any effect, but give it a try!
ie:
change:
to: