• I’m using this to display featured images in a js “image slider”. Since either 3.1 or (more likely) my own user-error, it results in only the 2nd-oldest post’s featured image displayed for each of 5 instance of $slide. Meanwhile, the_content() displays all 5 posts’ text just fine.

    See it in action

    //Displays featured images of posts with 'masthead_slider' category
    
    			$slider_args = array(
    				'category_name' => 'masthead_sliders',
    				'numberposts' => -1,
    				);
    			$slider = get_posts($slider_args);
    			foreach ($slider as $slide) : setup_postdata($slide); ?>
    				<div><?php the_post_thumbnail($post->ID); the_content();?>
    				</div>
    			<?php endforeach; ?>

    Thanks for any help on this!

  • The topic ‘Repeating Results w/ Category Filtering’ is closed to new replies.