Yeah, basically I want to be able to show 15 images attached to a certain page and have pagination when the page has more than 15 images.
I'm not very well versed on this kind of query so I'm a bit stumped.
<?php $args = array('numberposts' => 15, 'orderby' => 'menu_order', 'order' => 'ASC', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'post_parent' => $post->ID); ?>
<?php if ( $photos = get_posts($args) ) : ?>
<?php foreach ( $photos as $photo ) : ?>
<a href="<?php echo $photo->guid; ?>" target="_blank" class="lightbox" rel="[<?php echo $post->ID; ?>]"><?php echo wp_get_attachment_image($photo->ID,'thumbnail'); ?></a>
<?php endforeach; ?>
<?php endif; ?>