Advertisement
Guest User

Untitled

a guest
Feb 18th, 2020
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.49 KB | None | 0 0
  1. <?php if ( have_rows( 'baner' ) ):
  2.     while ( have_rows( 'baner' ) ) : the_row();
  3.         if ( get_row_layout() == 'baner' ) :
  4.             the_sub_field( 'ime_proizvoda' );
  5.             $slika_proizvoda = get_sub_field( 'slika_proizvoda' );
  6.             if ( $slika_proizvoda ) { ?>
  7.                 <a href="<?php the_sub_field( 'link_proizvoda' ); ?>" target="_blank"><img src="<?php echo $slika_proizvoda['url']; ?>" alt="<?php echo $slika_proizvoda['alt']; ?>" /></a>
  8.             <?php }
  9.         endif;
  10.     endwhile;
  11. else:
  12. // no layouts found
  13. endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement