• Hello, I really like this plugin so far have been pretty much able to have it display like I want.

    From what I understand, the program is limited to displaying galleries in an album in the order they have been entered into the album.

    I have been trying to find the code that could change the sort order to have the galleries most recently created displayed first on the page but haven’t managed to get that working.

    Has anybody done this or is there an easier way to modify?

    For testing I have been using https://www.chrispayne.ca/nextgen (I know not all galleries have pictures) they are there mostly as placeholders so I could fix my css and understand how it will be displayed.

    What I would like to see is this list reversed, with “Another new test” first in the list and “Red Pine Camp 2009” the last gallery in the list. (Sorry, it doesn’t help that I messed up the dates in between, I would hope to enter pictures as soon as I can to the album and probably wouldn’t have to deal with out of order dates although I guess that is always possible too.

    I had initially thought that I could set a specific order in the dashboard under Gallery | Album | select the correct album | and then under gallery drag and drop the order I wanted and then hit the update buttom up top but alas, no joy ??

    Thanks in advance for any help you can provide!

    Regards,

    Chris

    Thanks!

    Chris

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter cdpayne

    (@cdpayne)

    I finally have the answer but man is it hard to find, maybe there should be some stickies or a real searchable forum as I have seen tons of people asking the same question.

    Solution is to edit file nextgen-gallery\lib\ngg-db.php as follows:

    at line 317

    Change from

    $album->sortorder = serialize( $wpdb->get_col("SELECT gid FROM $wpdb->nggallery") );

    To

    $album->sortorder = serialize( $wpdb->get_col("SELECT gid FROM $wpdb->nggallery ORDER BY gid DESC") );

    Great, thanks!

    I was looking for a way to sort my galleries by title (not by ID) on the album page;

    If you want your galleries to be sorted by title on the album page, just do this;

    Edit file nextgen-gallery\lib\ngg-db.php as follows:

    at line 317

    Change from

    ‘$album->sortorder = serialize( $wpdb->get_col(“SELECT gid FROM $wpdb->nggallery”) );’

    To

    ‘$album->sortorder = serialize( $wpdb->get_col(“SELECT gid FROM $wpdb->nggallery ORDER BY title DESC”) );’

    energio

    (@energio)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: NextGEN Gallery] Display order of galleries’ is closed to new replies.