Loop displaying featured image problem
-
Howdy all.
I have this loop
<?php global $post; global $data; $args=array('post_type'=> 'logo','post_status'=> 'publish', 'orderby'=> 'menu_order', 'posts_per_page'=>6); $logo_posts = query_posts($args); //print_r($postsss); $i =1; while ( have_posts()):the_post(); $class = ""; if($i == 6): $class="last"; else : $class=""; endif; ?> <?php $feat_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?> <div class="logo span6 <?php echo $class;?>"><!--Logo start--> <img src="<?php echo aq_resize($feat_image, 157, 95, true ) ; ?>" alt="<?php the_title(); ?>" /> </div><!--Logo end--> <?php endwhile;?> <!--End the loop--> <?php wp_reset_query(); wp_reset_postdata();?><!--reset post data-->
My problem is the loop is displaying only the first image, the third image and so on. The second and the fourth image are not displayed. Here is a preview for a better understanding https://tinypic.com/view.php?pic=o2weq&s=5
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Loop displaying featured image problem’ is closed to new replies.