WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 1 down vote accepted

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?

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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