-
-
Save smjuber/97abd36380ce8f74b655ca6c7ae0b41f to your computer and use it in GitHub Desktop.
Revisions
-
isGabe created this gist
Jul 4, 2013 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ <?php $args = array( 'post_type' => 'attachment', 'numberposts' => -1, 'post_status' => null, 'post_parent' => $post->ID ); $attachments = get_posts( $args ); if ( $attachments ) { echo '<ul id="gallery" class="thumb-grid">'; foreach ( $attachments as $attachment ) { $large_image = wp_get_attachment_image_src($attachment->ID,'large',false); echo '<li><a href="' . $large_image[0] . '">'. wp_get_attachment_image( $attachment->ID, 'thumbnail' ) .'</a></li>'; } echo '</ul>'; } ?>