Skip Navigation

[Resolved] Sort gallery images by file name

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 1 reply, has 2 voices.

Last updated by Minesh 1 year, 5 months ago.

Assisted by: Minesh.

Author
Posts
#2627227
Screenshot 2023-07-26 at 3.41.40 pm.png

Tell us what you are trying to do? For example on this entry - hidden link, client would want to sort the images by file name. It seems that the images are displayed by date. I'm referring to photos on - 07-21-23 on this example. If it's sorted by file name, the first one should be - hidden link then followed by hidden link and so on and so forth.

Is there any documentation that you are following? No. But looking at the gallery settings, I can't find any options available, see attached

Is there a similar example that we can see? No

What is the link to your site? hidden link

#2627269

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

There is no such option available as of now to sort the gallery block images by filename alphabetically.

You may use and add some custom JS to sort the images, following links may help you:
=> https://stackoverflow.com/questions/12814212/how-to-sort-by-image-src-name-for-all-li-under-a-ul
=> https://stackoverflow.com/questions/13168657/how-to-sort-div-content-in-descending-order-by-image-name