Title: Sorting Native WordPress Gallery
Last modified: January 5, 2023

---

# Sorting Native WordPress Gallery

 *  [iantiu](https://wordpress.org/support/users/iantiu/)
 * (@iantiu)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/sorting-native-wordpress-gallery/)
 * Hello. I have a page showing all our laboratory-based memes. We make a ton of
   memes and we use a gallery for SEO. However, each time I add images, newest ones
   goes at the bottom. I can manually sort the images but sorting over 500 images
   is a pain.
 * Also, this is the native gallery of WordPress, not a plugin.
 * Is there a way to use a function to make the images sort by upload date from 
   newest to oldest? Thank you so much.
    -  This topic was modified 3 years, 5 months ago by [iantiu](https://wordpress.org/support/users/iantiu/).
      Reason: Add information
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsorting-native-wordpress-gallery%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [delfr](https://wordpress.org/support/users/delfr/)
 * (@delfr)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/sorting-native-wordpress-gallery/#post-16348127)
 * Hi there,
 * Things I found:
 * Change “Drag and Drop” to “Numerate”, number the pictures how you want and click
   save.
 * Or also, check the standard WP gallery shortcode here:
 * [https://codex.wordpress.org/Gallery_Shortcode#Options](https://codex.wordpress.org/Gallery_Shortcode#Options)
 * Also check this thread which is super detailed:
 * [https://wordpress.org/support/topic/order-by-exif-datetime/](https://wordpress.org/support/topic/order-by-exif-datetime/)
 * Hope this works!
 *  Thread Starter [iantiu](https://wordpress.org/support/users/iantiu/)
 * (@iantiu)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/sorting-native-wordpress-gallery/#post-16348344)
 * Thanks [@delfr](https://wordpress.org/support/users/delfr/). However, I usually
   end up uploading almost 100 memes at a time. It can still get pretty time consuming.
 * I did find a workaround. Not quite sort by date, but at least I can make them
   show up randomly. Instead of using the native gallery in WordPress, I used the
   Classic Editor box and show a media gallery. There is a checkbox for “Random”
   in it. I would still prefer having the newest ones on top, but having it show
   randomly is the next best thing. Thanks for your help 🙂
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/sorting-native-wordpress-gallery/#post-16348818)
 * There are really two “native” galleries. The fairly recent block gallery and 
   the much older shortcode gallery. The block gallery is difficult to customize
   beyond what the UI provides for. You have more options with the shortcode gallery.
   If you use the classic editor to create the gallery, you get the shortcode version.
   In the block editor, you can use the shortcode version by manually entering the
   shortcode into a shortcode block. Manually specifying a large gallery would be
   very tedious.
 * With the shortcode version, (assuming you created it with the classic editor 
   to avoid endless tedium) enter the editor’s text view and insert `orderby="date"`
   as one of the shortcode attributes.

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

The topic ‘Sorting Native WordPress Gallery’ is closed to new replies.

## Tags

 * [gallery](https://wordpress.org/support/topic-tag/gallery/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 3 replies
 * 3 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [3 years, 5 months ago](https://wordpress.org/support/topic/sorting-native-wordpress-gallery/#post-16348818)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
