Title: Sorting while excluding photos
Last modified: August 30, 2016

---

# Sorting while excluding photos

 *  Resolved [37373](https://wordpress.org/support/users/37373-1/)
 * (@37373-1)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/sorting-while-excluding-photos/)
 * Nextgen doesn’t correctly save the sort order after sorting and excluding specific
   photos.
 * For example: You sort photos in the order you want them to appear in the post.
   You move the photos you’re going to exclude to the bottom and mark them as ‘Exclude?’.
 * Very rarely do things turn out the way they’re supposed to. Most of the time 
   Nextgen moves everything around and the sort order becomes a mess. Even after
   editing the post and sorting the photos back the way you want them, Nextgen still
   insists on the incorrect sort order.
 * [https://wordpress.org/plugins/nextgen-gallery/](https://wordpress.org/plugins/nextgen-gallery/)

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

 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/sorting-while-excluding-photos/#post-6666580)
 * @37373 – Are you using the IGW’s Sort / Exclude accordion panel to work with 
   the specific display and clearing the image cache under Gallery > Other Options
   > Miscellaneous afterward to have the new order take effect immediately?
 * Also, if you are using a caching plugin/service, are you clearing those caches
   as well?
 * – Cais.
 *  Thread Starter [37373](https://wordpress.org/support/users/37373-1/)
 * (@37373-1)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/sorting-while-excluding-photos/#post-6666584)
 * I’ll try clearing the gallery cache but I don’t think it’s going to make a difference.
   I’m pretty sure there’s a bug in the plugin. It’s the backend that’s causing 
   problems. After sorting the photos and clicking save, if I click right back on
   the gallery photo to bring up the gallery dialog without even updating the post,
   the photos show incorrect sort order. Nextgen simply isn’t saving the sort order
   and it’s always the excluded photos that cause problems; Nextgen shifts them 
   right back out of order.
 * Not using any caching plugins.
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/sorting-while-excluding-photos/#post-6666673)
 * @37373 – I’m not seeing in my test sites what I am understanding via the description
   of your problem, sorting a gallery with excluded items is saving the sort order
   I am using.
 * I’ve re-tested the sort via the IGW as well as generally via Gallery > Manage
   Galleries and both are working as expected.
 * If there is no caching aspect to this issue perhaps there is something specific
   about the display settings?
 * Thanks!
 * – Cais.
 *  Thread Starter [37373](https://wordpress.org/support/users/37373-1/)
 * (@37373-1)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/sorting-while-excluding-photos/#post-6666691)
 * Here are the steps I take to re-create the issue:
 * I upload photos to a new gallery.
 * I click on manage gallery and sort the gallery.
 * I create a new post and click on the gallery icon to bring up the gallery dialog.
 * I re-arrange the photos, the sort order is not the same as the sort order I made
   earlier. I move the photos I’m going to exclude to the bottom and click exclude.
 * I click save and publish the post. Nextgen moves some, but not all of the excluded
   photos I moved to the bottom back to their original position and moves the photo
   that was in that position to the bottom.
 * I would say this happens at least 7/10 times.
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/sorting-while-excluding-photos/#post-6666719)
 * @37373 – I am not able to recreate what you are describing you are seeing on 
   your site.
 * There could be a plugin conflict going on here or at least it should be ruled
   out. Have you tried deactivating all of your plugins, clearing your browser cache(
   and site caches if you are using a caching plugin), then reactivating the NextGEN
   plugin?
 * If this fixes the problem then it was likely one of the deactivated plugins that
   was causing an issue. Now, retrace your steps activating each plugin and re-checking
   to see if the problem returns. If it does then that last activated plugin was
   probably the one. Keep reactivating and in most cases it is also best to keep
   checking after each plugin, sometimes there may be more than one plugin on a 
   site that will create an issue. If you do find one (or more) plugins causing 
   this problem we would greatly appreciate your feedback on them so the developers
   may address them as soon as they can.
 * Also to note, in rare cases it may be the theme itself that is causing a conflict
   so while you have just the NextGEN plugin activated you might consider temporarily
   switching to one of the default WordPress Twenty series themes and see if this
   corrects the issue as well.
 * If the problem still persists after all of this we would still want to know, 
   even more so, as we will still want to sort out the issue and may need additional
   details.
 * Thanks!
 * – Cais.
 *  Thread Starter [37373](https://wordpress.org/support/users/37373-1/)
 * (@37373-1)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/sorting-while-excluding-photos/#post-6666736)
 * Here’s how I’m able to replicate it every single time:
 * Follow the steps I listed in my previous post, upload 20 photos. When you sort
   them within the post, drag four photos to the bottom and exclude them. It needs
   to be that exact number of photos and excluded photos, it replicates the issue
   for me every time.
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/sorting-while-excluding-photos/#post-6666745)
 * @37373 – Are you saving between each step of your process? This could just be
   a workflow/process issue to be addressed.
 * Thanks!
 * – Cais.
 *  Thread Starter [37373](https://wordpress.org/support/users/37373-1/)
 * (@37373-1)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/sorting-while-excluding-photos/#post-6666746)
 * What do you mean by saving between each step of the process? The only points 
   where I save are when I sort the gallery after uploading in ‘Manage Gallery’ 
   and when I sort the gallery within ‘Add New Post’.
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/sorting-while-excluding-photos/#post-6666776)
 * @37373 – Clicking on the manage gallery link after uploading opens a new tab,
   saving after sorting there is important but the original tab you uploaded in 
   may be keeping a cached version of the gallery which you may be inadvertently
   saving which would appear to “break” your sort order(s).
 * In general, I’m not seeing anything wrong with your process I’m just trying to
   eliminate the possibility of workflow issues.
 * – Cais.
 *  Thread Starter [37373](https://wordpress.org/support/users/37373-1/)
 * (@37373-1)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/sorting-while-excluding-photos/#post-6666777)
 * I keep three tabs open along the process:
 * 1: Add Gallery / Images (I keep it open even after I’ve added a gallery)
 * 2. Manage Gallery
 * 3. Add New Post
 * Maybe it’s also worth mentioning that I name my photos in groups – example-1-
   1.jpg example-1-2.jpg example-2-1.jpg etc.
 * I’ve noticed Nextgen breaks sort order by filename as soon as I drag and drop
   all my photos into Add Gallery. For example, I’ll have 10 photos in groups 1-
   10 and 2-10. When I drag and drop them, it keeps most of the sort order correct
   but takes certain photos from 2-10 to the top. So an example sort order after
   dragging and dropping all 20 photos at once would be: 2-7 2-8 2-9 2-10 1-1 1-
   2 1-3 1-4 1-5 1-6 1-7 1-8 1-9 1-10 2-1 2-2 2-3 2-4 2-5 2-6. Maybe that somehow
   contributes to the problem?
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/sorting-while-excluding-photos/#post-6666778)
 * @37373 – I’m still not able to reproduce the issue(s) you are describing … perhaps
   try saving after every action (and not using multiple tabs to work with the same
   gallery).
 * For example: add the images; save. Then sort the images, and save. Then open 
   the edit post page and add the display via the IGW and check the sort order under
   the Sort / Exclude accordion tab (it should reflect the sort order you saved 
   above). Make some additional sorting changes and save again.
 * Update the post after every save to the IGW inserted display as well.
 * The natural order of your images with the file naming convention you are using
   would also not typically be the order you are describing by default as well (
   NextGEN Gallery would treat the file names as “strings” and sort appropriately)
   but that does not seem to be the concern at this time.
 * Thanks!
 * – Cais.
 *  Thread Starter [37373](https://wordpress.org/support/users/37373-1/)
 * (@37373-1)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/sorting-while-excluding-photos/#post-6666790)
 * Doing everything in the same tab instead of keeping all those tabs open has significantly
   decreased how often I encounter this problem.
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/sorting-while-excluding-photos/#post-6666798)
 * @37373 – Is there a specific method you are still able to use to recreate the
   problem using only the same tab still?
 * – Cais.
 *  Thread Starter [37373](https://wordpress.org/support/users/37373-1/)
 * (@37373-1)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/sorting-while-excluding-photos/#post-6666821)
 * No specific method, it’s really hard for me to recreate the issue when using 
   the same tab.
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/sorting-while-excluding-photos/#post-6666825)
 * @37373 – Thanks for trying.
 * – Cais.

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

The topic ‘Sorting while excluding photos’ 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/)

 * 15 replies
 * 2 participants
 * Last reply from: [photocrati](https://wordpress.org/support/users/photocrati/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/sorting-while-excluding-photos/#post-6666825)
 * Status: resolved