• Resolved ddrapeau

    (@ddrapeau)


    I have a small suggestion for your great plugin.

    The WordPress gallery codex says:

    order? specify the sort order used to display thumbnails. ASC or DESC. For example, to sort by ID, DESC: [gallery order="DESC" orderby="ID"]

    https://codex.www.ads-software.com/Gallery_Shortcode

    I have a page with a gallery shortcode that I created prior to installing Meow Galley. I had used “ASC” as suggested above, and it went to descending order after installing your gallery plugin … drove me nuts!

    I browsed your plugin code and found that in orderby.php you test for lowercase “asc” not “ASC”. I changed my shortcode to order=”asc” and it worked again!

    I realize that your tutorial page does say “order: desc or asc” but, alas, I had been influenced by the WordPress codex page when I first created the page.

    A small suggestion … Change the orderby.php as follows:

    // Check params
    if ( $orderby === 'ids' ) {
    $images = strtolower($order) === 'asc' ? sort( $images ) : rsort( $images );
    }
    else if ( $orderby === 'title' ) {
    $sqlOrderBy = strtolower($order) === 'asc' ? ' ORDER BY p.post_title ASC' : ' ORDER BY p.post_title DESC';
    }
    else if ( $orderby === 'date' ) {
    $sqlOrderBy = strtolower($order) === 'asc' ? ' ORDER BY p.post_date ASC' : ' ORDER BY p.post_date DESC';
    }
Viewing 1 replies (of 1 total)
  • Plugin Support Val Meow

    (@valwa)

    Hey @ddrapeau! ??

    Thanks for reporting this issue. It should be fixed soon in an upcoming update. Appreciate your patience and understanding.

Viewing 1 replies (of 1 total)
  • The topic ‘order=”ASC” does not work … but “asc” does’ is closed to new replies.