Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Using post thumbnails for custom header images -- works fine on straight pages. But custom templates that load a loop (including index) are pulling the first image instead of using the one set in the featured image field.

Anyone seen this before?

Thanks!

-m

share|improve this question
    
what theme are you using? can you post the code of the custom template(s)? –  Michael Feb 1 '13 at 23:46
    
It's a custom theme. I'm using <?php the_post_thumbnail('header'); ?> to get the image and then there's a loop that looks, pretty much like any other -- <?php $args = array('post_type' => 'people', 'category_name'=> 'current'); $people_posts = new WP_Query($args); if($people_posts->have_posts()) : while($people_posts->have_posts()) : $people_posts->the_post(); ?> etc etc.... –  Martin Feb 2 '13 at 3:43

1 Answer 1

Your theme uses a custom function to get the first image, if you post your index.php codes here you maybe find someone to help.

share|improve this answer
    
Nope -- just the standard '<?php the_post_thumbnail(); ?>` –  Martin Feb 2 '13 at 3:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.