Control the order in which items appear in a Gallery. FotoGrids supports five sort modes — from a fixed manual arrangement to fully randomised display — all applied server-side before the page is sent to the visitor’s browser.
Location Gallery Settings → Sorting
Default Sort Order #
| Setting | Default Sort Order |
| Options | Manual Date Title File Name Random |
| Default | Manual |
Determines how items are ordered each time the Gallery loads. The sort is applied on the server before the page is delivered — visitors receive items already in the configured order, with no client-side reordering needed.
The available sort modes are:
- Manual — Items appear in exactly the order you arranged them in Manage Items. This is the default and gives you complete control over the sequence.
- Date — Items are sorted by date. Two additional settings appear to control which date field is used and the direction. See Date Type and Sort Direction below.
- Title — Items are sorted alphabetically by their title (the attachment’s WordPress title). An additional setting appears to choose A-Z or Z-A. See Title Sort Direction below.
- File Name — Items are sorted A-Z by their original filename, case-insensitively. No additional direction setting is available at this tier.
- Random — Items are shuffled into a new random order on every page load.
Random sorting disables HTML caching for the Gallery. Each page request generates a fresh render, which may increase server load on high-traffic sites.
Date Type #
| Setting | Date Type |
| Options | Date Created Date Updated |
| Default | Date Created |
| Visible when | Default Sort Order is set to Date |
Selects which date field is used for ordering when Default Sort Order is set to Date:
- Date Created — sorts by the date the media file was originally uploaded to WordPress.
- Date Updated — sorts by the date the attachment was last modified.
Sort Direction #
| Setting | Sort Direction |
| Options | Newest First Oldest First |
| Default | Newest First |
| Visible when | Default Sort Order is set to Date |
Controls whether the date sort runs newest-to-oldest or oldest-to-newest.
Date Type and Sort Direction only appear when Default Sort Order is set to Date.
Title Sort Direction #
| Setting | Title Sort Direction |
| Options | A-Z Z-A |
| Default | A-Z |
| Visible when | Default Sort Order is set to Title |
Controls the alphabetical direction when sorting by title. Comparisons are case-insensitive, so “apple” and “Apple” are treated as equivalent.
Title Sort Direction only appears when Default Sort Order is set to Title.
How sorting works on the frontend #
Sorting is resolved entirely on the server, before the Gallery HTML reaches the browser. When a visitor loads a page containing a Gallery, FotoGrids applies the configured sort mode to the list of item IDs, then hydrates and renders those items in the resulting order. No JavaScript reordering takes place at load time.
Each sort mode queries WordPress’s attachment data in a single batch — there is no per-item database call regardless of Gallery size.
The Manage Items view in the Gallery editor always shows items in their manually arranged order, regardless of the active sort setting — so you can always manage item positions accurately.
More Sorting Options Pro #
FotoGrids Pro adds sorting capabilities beyond the built-in modes:
Allow Users to Change Sort Order — displays sort controls on the frontend so visitors can reorder items themselves, without leaving the page.
Advanced Multi-Criteria Sorting — sort by multiple fields at once (for example, date then title as a tiebreaker), or use metadata fields such as EXIF data, file size, and dimensions for precise control.
Metadata-Based Sorting — sort by tags, people, locations, and other metadata to create context-aware Galleries that surface the most relevant items first.