Forums

Nextgen gallery won't sort images (2 posts)

  1. hitch75
    Member
    Posted 1 year ago #

    Hi

    I've seen that this topic already existed, but I haven't found any solution.

    When I use the "Sort Gallery" funtion in Nextgen, the previeew looks ok, but the images still won't get sorted on my website, the old order stays the same.

    I have newest versions of WP and Nextgen.

    I am going crazy looking for an answer, please help!

  2. vasko_t
    Member
    Posted 1 year ago #

    The bug is in the file wp-content\plugins\nextgen-gallery\widgets\widgets.php around line 297:

    $imageList = $wpdb->get_results("SELECT t.*, tt.* FROM $wpdb->nggallery AS t INNER JOIN $wpdb->nggpictures AS tt ON t.gid = tt.galleryid WHERE tt.exclude != 1 $exclude_list ORDER by pid DESC limit 0,$items");

    The ORDER BY is incorrect, it should say ORDER by sortorder ASC

Topic Closed

This topic has been closed to new replies.

About this Topic