SHARE
TWEET

Untitled

a guest Aug 20th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php if ( get_field( 'page_slider' ) ) : ?>
  2. <div class="slider">
  3.     <?php while( has_sub_field( 'page_slider' ) ) : ?>
  4.         <?php if(get_sub_field('link'){ ?>
  5.             <a href="<?php the_sub_field('link'); ?>" class="slider__slide">
  6.                 <?php echo wp_get_attachment_image( get_sub_field( 'image' ), 'slider-2x' ); ?>
  7.             </a<
  8.         <php } else {
  9.             <div class="slider__slide">
  10.                 <?php echo wp_get_attachment_image( get_sub_field( 'image' ), 'slider-2x' ); ?>
  11.             </div>
  12.         <?php } ?>
  13.     <?php endwhile; ?>
  14. </div>
  15. <?php endif; ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top