From 38f8386c5c79e05cf52eed039673958099b53895 Mon Sep 17 00:00:00 2001 From: John Calande Date: Tue, 30 Aug 2016 11:19:23 -0400 Subject: [PATCH] fix search ordering, by post_date --- functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.php b/functions.php index b14cd1e..f4820e3 100644 --- a/functions.php +++ b/functions.php @@ -7,7 +7,7 @@ function my_search_query( $query ) { if ( !is_admin() && $query->is_main_query() ) { if ( is_search() ) { $query->set( 'orderby', 'post_date' ); - $query->set( 'order', 'ASC' ); + $query->set( 'order', 'DESC' ); } } }