Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Using query_posts in WordPress – the_post_thumbnail isn’t working

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #30538
    cssgirl
    Participant

    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 :




    ">

    ">


    Author: ">




    ">Download <?php the_title(); ?> Now!



    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

    #77730
    cjk
    Member

    Echo?

    #77731
    cjk
    Member

    Try this for chuckles…

    #77714
    jamygolden
    Member

    Do you have a live example? I’ve used <?php the_post_thumbnail();?> quite a few times and I’ve never had a problem.

    #77643
    cjk
    Member

    “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:

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Back End’ is closed to new topics and replies.