Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function allphotos_shortcode(){
- $images = get_field('fl_gallery');
- if( $images ) {
- $output .= '<ul id="kalpht">';
- foreach( $images as $image ) :
- $output .= '<li><a class="x-img-link" href="' . $image['url'] .'" data-options="thumbnail:'' . $image['sizes']['mini-me'] . ''"><img src="' . $image['sizes']['mini-me'] . '" alt="' . $image['alt'] . '" /></a></li>';
- endforeach;
- $output .= '</ul>' . do_shortcode('[lightbox opacity="0.9" thumbnails="true"]');
- }
- return $output;
- }
- add_shortcode('allphotos', 'allphotos_shortcode');
Add Comment
Please, Sign In to add comment