• Resolved jakub017

    (@jakub017)


    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 2 years, 4 months ago by jakub017.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Imagely

    (@imagely)

    Hi @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 2 years, 4 months ago by Imagely.
    • This reply was modified 2 years, 4 months ago by Imagely.
    • This reply was modified 2 years, 4 months ago by Imagely.
    • This reply was modified 2 years, 4 months ago by Imagely.
    Thread Starter jakub017

    (@jakub017)

    Thank you so much! ??
    Will the change be rolled back after the update? I guess yes

    Plugin Contributor Imagely

    (@imagely)

    Hi @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.