Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

Kittyridge on "Custom featured image size on first post only"

$
0
0

Can anyone provide a function to specify the featured image size for the first (most recent) post only? The featured image size needs to be untouched for all the other posts. Only the first post in the loop on page 1 needs a special featured image size. Below was my very lame attempt at it, which not surprisingly did not work:

if (have_posts() and has_post_thumbnail()) :
$post = $posts[0]; $c=0;
while (have_posts()) : the_post();
$c++;
if( !$paged && $c == 1) :
the_post_thumbnail('full');
endif;
endwhile;
php endif;

Any help appreciated as this is obviously over my head.


Viewing all articles
Browse latest Browse all 8245

Trending Articles