WordPress.org

Ready to get started?Download WordPress

Forums

Media Library Assistant
[resolved] Sorting is ignored (2 posts)

  1. mytinas
    Member
    Posted 5 months ago #

    Hello,
    your PlugIn is great, but I have a problem to sort my gallery. I had try everything I could find, but the sorting is ignored. My actual try is:

    [mla_gallery attachment_category=doodle-galerie mla_alt_shortcode=gallery type="rectangular" mla_alt_ids_name=include orderby="id desc"]

    The pictures should be sort by ID or date, so thats the newest first. The link to my Page: http://blog.tinas-welt.de/galerien/doodle-galerie. Can you help me?

    Thank you
    Tina

    PS: And sorry for my bad english...

    https://wordpress.org/plugins/media-library-assistant/

  2. David Lingren
    Member
    Plugin Author

    Posted 5 months ago #

    Tina,

    Thanks for your good words and your question. Your English is fine (much better than my German). Your sorting issue can be fixed by some simple adjustments to the shortcode.

    First, remove the mla_alt_ids_name=include parameter. You may have seen this in an earlier support topic, but it is not necessary and in your case Jetpack actually re-sorts the gallery in ascending ID order.

    Second, change the orderby parameter to orderby="ID DESC". The actual name of the database element is ID, and it is case sensitive. The change to DESC is optional, but good practice.

    You could also use orderby="date DESC"], which sorts on the upload date and would make the shortcode easier to understand.

    I am marking this issue resolved, but please update it if you have any problems or further questions. Thanks for your interest in the plugin.

Reply

You must log in to post.

About this Plugin

About this Topic