How to manage a particular “order by” for get_search_query()?
You can use the parse_query action hook, and set the orderby and order paramenters. function my_mod_search($query) { if ($query->is_search()) { $query->query_vars[‘order’] = ‘ASC’; $query->query_vars[‘orderby’] = ‘post_date’; } } add_action(‘parse_query’, ‘my_mod_search’);