I have an Html page in which There is a slider. here's the html code
<div data-thumb="images/slide1.jpg" data-src="images/slide1.jpg">
</div>
<div data-thumb="images/slide2.jpg" data-src="images/slide2.jpg">
</div>
<div data-thumb="images/slide3.jpg" data-src="images/slide3.jpg">
</div>
I am trying to convert this page into wordpress. Here's how I am doing this in wordpress to load the images.
<?php
$options = array(
'post_type' => "slideshow",
);
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<div data-thumb="<?php if ( has_post_thumbnail() ) { the_post_thumbnail('full'); } ?>" data-src="<?php if ( has_post_thumbnail() ) { the_post_thumbnail('full'); } ?>">
</div>
<?php endwhile; ?>
But It is not working.My pictures are not showing in the slider. But When I check the page source It is correctly getting the image.
here's the source that generates
<div data-thumb="<img width="1170" height="385" src="http://localhost/wordpress/wp-content/uploads/2014/09/slide1.jpg" class="attachment-full wp-post-image" alt="slide1" />"
data-src="<img width="1170" height="385" src="http://localhost/wordpress/wp- content/uploads/2014/09/slide1.jpg" class="attachment-full wp-post-image" alt="slide1" />">
</div>