Skip to content

Instantly share code, notes, and snippets.

@janisdonis
Created March 12, 2015 11:20
Show Gist options
  • Save janisdonis/e1ddd052f02d23cdd316 to your computer and use it in GitHub Desktop.
Save janisdonis/e1ddd052f02d23cdd316 to your computer and use it in GitHub Desktop.
Json array
<script id="images2<?php echo get_the_ID(); ?>" type="text/cycle">[
<?php foreach( $images as $image ): ?>
<?php if ( $counter == 0 ) { ?>
<?php } else { ?>"<img src='<?php echo $image['sizes']['large']; ?>'>",<?php }
$counter++;
?>
<?php endforeach; ?>]
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment