Update archive-gallery.php

Fixed archive pagination issue.