max_num_pages > 1 ) : ?>
-
1 ) :
$next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
else :
// or get the URL of the first image attachment
- $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID );
+ $next_attachment_url = get_attachment_link( $attachments[0]->ID );
endif;
else :
// or, if there's only 1 image, get the URL of the image