On Sample Page, I have slider on which more than 200 Posts are sliding. each slide have 5 images. I have fetch all data in slider but slider load all images first. that's why my page speed is very slow. So i want optimize way to show it in slider without slow loading.
This is my code as show below: [In this code print one image, but i will have 5 images to load].
$my_query = new WP_Query('post_type=property&posts_per_page=-1&order=asc');
while ($my_query->have_posts()) : $my_query->the_post();
echo '<p>'.the_title().'</p>';
$feat_image = wp_get_attachment_url(get_post_thumbnail_id($post->ID) );
if($feat_image!=""){ ?><img src="<?php echo $feat_image;?>" width="200"/><?php }
endwhile; wp_reset_query(); ?>
So In loop, there is more than 200 data. this results very slow loading. i just want it fast with slider. that's it.