2

I want to show photos attached to a post in a gallery using the built-in system with a custom order. Currently with the [gallery] shortcode it is posible to order it by name, by upload date, by ID, randomly or by a custom "menú order". I guess there are more option with custom queries in templates, but I haven't looked for that yet.

I would like to order a large bunch of photos and keep them by the date they were taken (not a core option, but that is a tangential issue), particularly as I would like eventually to continue uploading things later to the same gallery and I may get a bit confused if some photos belong between the already uploaded ones. Also, is not always easy to get the photos uploaded in order, even.

My problem is that a simple "post_date" orderby query is not enough for me as I still would like to change the order of a few attachment for conceptual issues after the "post_date" order. So, I would like to have an option on the UI to automatically reorder the "menu order" to another predefined order (i have the "EXIF created_timestamp" in mind, but it can be alphabetical, uploaded date / ID or even random), and one could continue changing manually the order on top of that.

I want to ask if there's already a plugin that does something similar to that or if there are some functions that I have to look for reference.

  • Interesting question, but leave off the plugin recomendation part, it's off-topic. And if you have done some research, post your effort results, it will be appreciated by the community and you can get better answers. – gmazzap Feb 15 '14 at 22:29
  • you could do it with a simple meta-box and custom fields. Or if you want to add it to the actual uploader UI you could have a look at attachment_fields_to_edit and attachment_fields_to_save hooks. on the right you will find a link with example implementation – krembo99 Feb 16 '14 at 6:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.