Changing display order of entries

Discussion corner for Developers of Serendipity.
Post Reply
Tim Posey

Changing display order of entries

Post by Tim Posey »

I would like to be able to change the display order of the entries to the blog on each page so that the oldest items displays first, is there an easy way to accomplish this?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Changing display order of entries

Post by garvinhicking »

Yes, you can edit your include/genpage.inc.php file.

Replace:

Code: Select all

        // Welcome screen or whatever
        default:
            serendipity_printEntries(serendipity_fetchEntries(null, true, $serendipity['fetchLimit']));
            break;
with

Code: Select all

        // Welcome screen or whatever
        default:
            serendipity_printEntries(serendipity_fetchEntries(null, true, $serendipity['fetchLimit'], false, false, 'timestamp ASC'));
            break;
You could also outsource the include/genpage.inc.php as your template's config.inc.php or layout.php file. But since this is advanced stuff and harder to achieve, you'll maybe not want to do this.

Last but not least: You posted a question here that is not related to helping us developers. :-) It would've been better in the "themes" or "general" section of this forum...

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply