Created
January 13, 2015 17:34
-
-
Save mikemcalister/228af6f96433e6557c3f to your computer and use it in GitHub Desktop.
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
<?php // image gallery content | |
if( has_shortcode( $post->post_content, 'gallery' ) ) { | |
// Grab the first gallery in the post | |
$gallery = get_post_gallery_images( $post->ID ); | |
$image_list = '<div class="owl-carousel">'; | |
// Loop through each image in each gallery | |
foreach( $gallery as $image ) { | |
$image_list .= '<div><img src=" ' . $image . ' " /></div>'; | |
} | |
$image_list .= '</div>'; | |
// Display gallery | |
echo $image_list; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment