Created
July 13, 2013 07:08
-
-
Save janisdonis/5989736 to your computer and use it in GitHub Desktop.
Wordpress Advanced custom fields gallery template use
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="gallery thumb_list"> | |
<?php if (have_posts()) : while (have_posts()) : the_post();?> | |
<?php | |
$images = get_field('bildes'); | |
if( $images ): ?> | |
<?php foreach( $images as $image ): ?> | |
<div class="gal_thumb"> | |
<a href="<?php echo $image['sizes']['large']; ?>" rel="prettyPhoto[gallery<?php echo $post_id;?>]"><img src="<?php echo $image['sizes']['thumbnail']; ?>" alt="<?php echo $image['title']; ?>"/></a> </div> | |
<?php endforeach; ?> | |
<?php | |
?> | |
<?php endif; ?> | |
<?php endwhile; endif; ?> | |
<div class="clear"></div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment