Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HEADER
- <script type="text/javascript">
- ( function($) {
- $(document).ready(function(){
- $('#product-slider').bxSlider({
- pagerCustom: '#bx-pager',
- pager: 'false'
- });
- });
- } ) ( jQuery );
- </script>
- HTML
- <div class="featured_image grid_5">
- <?php if(get_field('prod-images')): ?>
- <div id="product-slider">
- <?php while(the_repeater_field('prod-images')): ?>
- <?php $image = wp_get_attachment_image_src(get_sub_field('prod-image'), 'full'); ?>
- <?php $thumb = wp_get_attachment_image_src(get_sub_field('prod-image'), 'thumbnail'); ?>
- <img src="<?php echo $image[0]; ?>" alt="<?php the_sub_field('title');?>" rel="<?php echo $thumb[0]; ?>" />
- <?php endwhile; ?>
- </div>
- <?php endif; ?>
- </div>
- <?php if(get_field('prod-images')): ?>
- <div class="image_thumbs grid_1">
- <div id="bx-pager">
- <?php while(the_repeater_field('prod-images')): ?>
- <?php $image = wp_get_attachment_image_src(get_sub_field('prod-image'), 'full'); ?>
- <?php $thumb = wp_get_attachment_image_src(get_sub_field('prod-image'), 'thumbnail'); ?>
- <a data-slide-index="" href="#"><img src="<?php echo $image[0]; ?>" alt="<?php the_sub_field('title');?>" rel="<?php echo $thumb[0]; ?>" /></a>
- <?php endwhile; ?>
- </div>
- <?php endif; ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement