[resolved] Order the posts of the main page by post_modified (3 posts)

  1. vbalogh
    Posted 8 years ago #

    I'm using the latest 2.3.1 version.
    I've searched several hours, and tried to modify the php code to order the front page by post_modified.
    As I've figured out it is ordered now by post_date.

    I'm running a panorama photo blog, and the post_date refers to the time the photo was taken, but the date of post publishing differs.

    However, now I can't see those posts that I've published at last. I just want to sort the front page by post_modified, I think it will solve my problem.

    Can anybody help me?

  2. vbalogh
    Posted 8 years ago #

    I keep trying...

    If I change the lines 763 and 765 of the general-template.php
    then it works justbackwards:

    The displayed timestamps will be the date of modify,
    but the sort order goes by post_date timestamp.

  3. vbalogh
    Posted 8 years ago #

    I've found the solution,
    query.php line 1120 ;)

    just replace the

    $q['orderby'] = 'post_date '.$q['order'];

    line with

    $q['orderby'] = 'post_modified '.$q['order'];

Topic Closed

This topic has been closed to new replies.

About this Topic