Grow your CSS skills. Land your dream job.

Detect post thumbnail

  • # June 5, 2012 at 4:34 am

    WP. Simply I use this code to get the post thumbnail: (when the thumbnail.php page provided)
    < ?php include(TEMLATEPATH . '/thumbnail.php')' ?>
    It’s done for a single page with a single thumbnail. But what to do, when I want to have a gallery of thumbnails or something like that. See the code below:

    < ?php
    query_posts('posts_per_page=1&cat=7');
    while(have_posts()) : the_post();?>

    " >< ?php the_title(); ?>


    In the code above, if I use my first code (…/thumbnail.php), that will show same thumbnails for the titles and should use something else than this one. I want to give each title its own thumbnail.
    Note. I want to use my special post thumbnail as its thumbnail, not the first image of the post.
    How to do that without using a plugin or custom fields, with a simple trick?

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".