From 16d5e24771c2874bca5072772090dbd5123371d3 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 14 Mar 2007 02:21:39 +0000 Subject: [PATCH] Fix order by in wp_get_archives(). Props mattbta. fixes #3961 git-svn-id: http://svn.automattic.com/wordpress/trunk@5036 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/general-template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index b7e6c214fc..054150afd4 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -415,7 +415,7 @@ function wp_get_archives($args = '') { } } elseif ( ( 'postbypost' == $type ) || ('alpha' == $type) ) { ('alpha' == $type) ? $orderby = "post_title ASC " : $orderby = "post_date DESC "; - $arcresults = $wpdb->get_results("SELECT * FROM $wpdb->posts $join $where $orderby $limit"); + $arcresults = $wpdb->get_results("SELECT * FROM $wpdb->posts $join $where ORDER BY $orderby $limit"); if ( $arcresults ) { foreach ( $arcresults as $arcresult ) { if ( $arcresult->post_date != '0000-00-00 00:00:00' ) {