From 13721f31153d04b9fcabe82c28d30261790a3d3e Mon Sep 17 00:00:00 2001 From: John Calande Date: Wed, 3 Aug 2016 08:57:55 -0400 Subject: [PATCH] changes for sort order --- functions.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/functions.php b/functions.php index 98651a1..3180aba 100644 --- a/functions.php +++ b/functions.php @@ -1,4 +1,17 @@ is_main_query() ) { + if ( is_search() ) { + $query->set( 'orderby', 'post_title' ); + $query->set( 'order', 'ASC' ); + } + } +} +add_action( 'pre_get_posts', 'my_search_query' ); function neag_scripts() { wp_enqueue_style( 'neag-style', get_stylesheet_directory_uri() . '/css/neag.css');