Answer by Maxwell s.c for Display thumbnail only on the very first post in...
Just check the current_post valueglobal $wp_query; // get the global query - works in custom queries tooif(0 == $wp_query->current_post){ /**is the first post**/ }
View ArticleAnswer by Dwayne Charrington for Display thumbnail only on the very first...
This is what I use in my projects and it works well for me. I modified the code you provided to suit. Simply drop it in and it will display the post thumbnail only for the first post. <!-- Start the...
View ArticleAnswer by petermolnar for Display thumbnail only on the very first post in...
add a variable before the loop (before the while), for example $first = true;add a check inside the loop for this variableafter the use, change the flagCode:<!-- Start the Loop. --><?php...
View ArticleAnswer by fuxia for Display thumbnail only on the very first post in the loop?
This code in your template will display the post thumbnail only for the first post:<?php ! isset ( $loop_first ) and the_post_thumbnail(); $loop_first = 1;?>
View ArticleDisplay thumbnail only on the very first post in the loop?
What's the best way to use <?php the_post_thumbnail();?> in my loop BUT only show a thumbnail on the FIRST post? Meaning, only the first post in the loop will have it's image shown? Here is an...
View Article
More Pages to Explore .....