Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

A client of mine wishes to not have to sort images uploaded into a post gallery, but instead rely on its filename for sorting (e.g. "01_sample.jpg", "02_sample.jpg"). This would save a lot of time for the client, and I'm wondering if this is possible to achieve using WP 3.5+ and the recent changes to Add Media?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

When you or the client add the gallery shortcode, you can add an "orderyby" option to specify the order of the images. Per the Codex page on the gallery shortcode:

[gallery ids="729,732,731,720" orderby="title"]

... will do what you're wanting.

share|improve this answer
    
Thanks! My client will be happy to hear this :) –  Staffan Estberg Feb 21 '13 at 10:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.