Support » Plugins » Loop displaying featured image problem

  • Resolved herowp


    Howdy all.

    I have this loop

                                        global $post;
                                        global $data;
                                        $args=array('post_type'=> 'logo','post_status'=> 'publish', 'orderby'=> 'menu_order', 'posts_per_page'=>6); 
                                        $logo_posts = query_posts($args);  
                                        $i =1;	
                                        while ( have_posts()):the_post();
                                            $class = "";
                                            if($i == 6): $class="last"; else : $class=""; endif;
    							  $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

Viewing 1 replies (of 1 total)
  • herowp


    I figured it out. It was from the aq_resize function. The images that I have uploaded were smaller then 157×95. 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘Loop displaying featured image problem’ is closed to new replies.