Currently the RSS feed of my WordPress blog gives me the latest published posts. Is it possible to change this so that it returns the ones that are latest updated instead? So that the latest published are still in the feed, but if I update an old post it would pop up in a feed reader.


Try this (not tested) add to your functions.php of active Theme

function wpse49312_alter_the_query( $request ) {
    $dummy_query = new WP_Query();
    $dummy_query->parse_query( $request );

    if ( $dummy_query->is_feed() )
        $request['orderby'] = 'modified';

    return $request;
add_filter( 'request', 'wpse49312_alter_the_query' );

From Alternative to query_posts for main loop?

  • Tested. Works fine :) – user15194 Apr 17 '12 at 16:06
  • Cool! Will test it out on my blog. Is there any special meaning to wpse49312? – Svish Apr 19 '12 at 7:33
  • Added it to my functions.php file now, but doesn't seem to change the order of the feed? As far as I can see anyways... :/ – Svish Apr 19 '12 at 8:57
  • Actually, seems like it does! – Svish Sep 26 '12 at 7:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.