Updated archive and gallery to id sorting.