add_action('pre_get_posts','my_change_sort_order');functionmy_change_sort_order($query){if(is_archive())://If you wanted it for the archive of a custom post type use: is_post_type_archive( $post_type )//Set the order ASC or DESC$query->set('order','DESC');//Set the orderby$query->set('orderby','publish_date');endif;};