Is there an easy way to reverse the default item order of a category rss feed?

Default: Last posted item first
Wanted: First posted item first

No plugins please, plain wp api function calls (such as add_action or add_filter) will do!

  • 1
    "plain wp php" is a plugin or a theme or any other bit of functionality that you add outside of WordPress' core. Commented Nov 29, 2012 at 20:23

2 Answers 2


In your functions.php file

function reverseorder($query_string)  
    return query_posts( $query_string . '&order=ASC' );
add_action( 'rss2_head', 'reverseorder' );


GET parameters on RSS feed
cat - category ID (e.g. 23)
author - author ID (e.g. 14)
year - year the post was published (e.g. 2007)
day - day of the month the post was published (e.g. 17)
monthnum - number of the month the post was published (e.g. 6)
hour - hour of the day the post was published (e.g. 23)
minute - minute of the hour the post was published (e.g. 48)
second - second of the minute the post was published (e.g. 51)
p - the unique post ID to display (e.g. 629)
paged - specific page number as displayed on the main blog page (e.g. 3)

  • @mahatmanich Who is your comment for up there? If it worked, please mark as correct answer.
    – Chris
    Commented Nov 29, 2012 at 20:50
  • The comment was for the other Chris that was being a smart alec. I am still looking at the solution you posted here however it does not quite work in my instance! Commented Nov 29, 2012 at 22:35
  • Basically you need to reverse the order of the feed-rss2.php file using that action on line (36?)
    – Chris
    Commented Nov 30, 2012 at 0:31
  • Actually I could just use the GET parameter when calling the feed couldn't I? Commented Nov 30, 2012 at 1:47
  • Hmm, to my knowledge ordering of RSS feed is not a get parameter.
    – Chris
    Commented Nov 30, 2012 at 2:12

You can simply reorder your RSS Feed via the GET parameter ?order=ASC or ?order=DESC after your FEED url!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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