Title: Sort from newest
Last modified: July 4, 2022

---

# Sort from newest

 *  Resolved [jakub017](https://wordpress.org/support/users/jakub017/)
 * (@jakub017)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/sort-from-newest/)
 * Hi, I wish I could view all my galleries from the newest. Now each time I have
   to click the arrow next to the ID to get it. Can it be done permanently in plugin
   settings or code?
 * I would like to add that I have over 3,000 galleries, so I’d rather avoid a manual
   solution.
 * Thank you for providing such amazing plugin! 🙂
    -  This topic was modified 3 years, 10 months ago by [jakub017](https://wordpress.org/support/users/jakub017/).

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Contributor [Imagely](https://wordpress.org/support/users/imagely/)
 * (@imagely)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/sort-from-newest/#post-15795357)
 * Hi [@jakub017](https://wordpress.org/support/users/jakub017/),
 * NextGen Gallery doesn’t have such a setting but you can change the default order
   editing
 * _“nextgen-gallery\products\photocrati\_nextgen\modules\ngglegacy\admin\manage-
   galleries.php”_ file line 22
 * replacing:
 * `$order = apply_filters('ngg_manage_galleries_items_order', 'ASC');`
 * with:
 * `$order = apply_filters('ngg_manage_galleries_items_order', 'DESC');`
    -  This reply was modified 3 years, 10 months ago by [Imagely](https://wordpress.org/support/users/imagely/).
    -  This reply was modified 3 years, 10 months ago by [Imagely](https://wordpress.org/support/users/imagely/).
    -  This reply was modified 3 years, 10 months ago by [Imagely](https://wordpress.org/support/users/imagely/).
    -  This reply was modified 3 years, 10 months ago by [Imagely](https://wordpress.org/support/users/imagely/).
 *  Thread Starter [jakub017](https://wordpress.org/support/users/jakub017/)
 * (@jakub017)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/sort-from-newest/#post-15796269)
 * Thank you so much! 🙂
    Will the change be rolled back after the update? I guess
   yes
 *  Plugin Contributor [Imagely](https://wordpress.org/support/users/imagely/)
 * (@imagely)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/sort-from-newest/#post-15797223)
 * Hi [@jakub017](https://wordpress.org/support/users/jakub017/),
 * That’s correct. Changing it directly within the plugin’s file will require re-
   doing the change after each NextGen Gallery plugin’s update and for each of the
   sites but you also can rewrite it adding a code snippet as below to your child
   theme’s functions.php file or using a plugin like Insert PHP Code Snippet:
 *     ```
       add_filter( 'ngg_manage_galleries_items_order', 'custom_ngg_manage_galleries_items_order' );
       function custom_ngg_manage_galleries_items_order( $orderby )
       {
               return "DESC";
       }
       ```
   

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Sort from newest’ is closed to new replies.

 * ![](https://ps.w.org/nextgen-gallery/assets/icon-256x256.png?rev=2083961)
 * [Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery](https://wordpress.org/plugins/nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery/reviews/)

## Tags

 * [galleries](https://wordpress.org/support/topic-tag/galleries/)
 * [newest](https://wordpress.org/support/topic-tag/newest/)
 * [sort](https://wordpress.org/support/topic-tag/sort/)

 * 3 replies
 * 2 participants
 * Last reply from: [Imagely](https://wordpress.org/support/users/imagely/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/sort-from-newest/#post-15797223)
 * Status: resolved