Forums

[resolved] [Plugin: NextGEN Gallery] How to sort images by date/time ? (3 posts)

  1. korythewebguy
    Member
    Posted 1 year ago #

    I'd like to display albums and galleries with the newest images showing first, namely according to the date/time they were added.

    Is the option or shortcode for doing so simply hidden away somewhere, or is this functionality missing from NextGen Gallery?

    After a considerable amount of searching Google and the WP Forums, I've not found an answer - I may just dive into the PHP code and add this myself, but wanted to ask if this functionality existed before I go and "re-invent the wheel" so to speak.

    Any information or help is greatly appreciated - Thanks in advance to all who reply! :-)

  2. korythewebguy
    Member
    Posted 1 year ago #

    Well, I've found something of a solution:

    By enabling the 'NextGen Gallery Widget,' I can plug this PHP code directly into the template to show a specific number of the most recent images:

    <?php nggDisplayRecentImages(numberofpictures,width,height); ?>

    Unfortunately, I'll have to do a little code modification to make it link to the images as I'd like - It would, however, be nice to see a "By date" sorting method added into the album/gallery shortcode.

    In any case, I genuinely appreciate Alex Rabe and the rest of the NextGen Gallery team creating such a fantastic plug-in - Keep up the excellent work!

  3. bee dudler
    Member
    Posted 1 year ago #

    Hi,
    as the pictures always get ids counting up as they are added you should simply let sort them by id, you can do that by going to Gallery->Options->Gallery there the last two entries sort by - and ascending or descending.

    P.S.
    you can also use custom fields:
    http://nextgen.boelinger.com/custom-fields/
    best regards
    bee

Topic Closed

This topic has been closed to new replies.

About this Topic