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');