Created
September 16, 2013 01:50
-
-
Save RevConcept/6575877 to your computer and use it in GitHub Desktop.
Modifications to include a lightbox effect with the post attachment automatic slide output: http://revelationconcept.com/wordpress-display-all-post-attachment-images-in-a-slider/
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
// Add this after line 18 in the example: | |
$thumb_array = image_downsize( $image->ID, 'your-custom-image-size' ); | |
$thumb_url = $thumb_array[0]; | |
// Now, you will need to modify the output to include your thumbnail image, a link to the full image and your lighbox classes. So lines 20-28 should look something like this: | |
echo '<li>'; | |
echo '<a class="your-lightbox-class" href="'; | |
echo $img_url; | |
echo '">'; | |
echo '<img src="'; | |
echo $thumb_url; | |
echo '" alt="'; | |
echo $img_alt; | |
echo '" title="'; | |
echo $img_title; | |
echo '" />'; | |
echo '</a>'; | |
echo '</li><!--end slide-->'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment