Ordering photos in gallery in WP2.5 (2 posts)

  1. jbiesnecker
    Posted 8 years ago #

    I'm trying to change the order in which the photos that I post using WP2.5's new gallery functions are displayed. I'd like them displayed in chrono order, but right now they're being displayed in the order that they're uploaded.

    I found what I thought was a solution, editing wp-includes/media.php directly and changing the gallery_shortcode() code to specify the orderby as post_name ASC (because my camera names the photos sequentially, so it's as good as by date for most purposes.

    Unfortunately, the changes aren't showing up. I'm not using any sort of cache, and my wp-contents/cache folder is empty. If I make changes to the HTML put out by the gallery_shortcode() code it is immediately reflected in the markup. However, even if I purposely put non-existent row names into the orderby variable (which should throw an MySQL error) nothing happens.

    It makes me think something is being cached, but I can't figure it out. I've cleared my own browser cache, tried other browsers, etc., and nothing changes it.

  2. Phil Johnston
    Posted 7 years ago #

    To anyone looking for an attachment and image ordering solution - I'm trying and hoping to come up with an ordering solution here:


    If you know anything please reply

Topic Closed

This topic has been closed to new replies.

About this Topic