Change wordpress to display search results in chronological order -


this thesis theme site using core wp search functionality. not looking new plugin solution, how alter search results change order of posts relevance chronological order. appreciated.

some of native wp search results, terms not have type time info stored. can use wp_user_query order of records. not expected have chronological order:

$args = array( 'search'    => 'search_patern_from_form', 'orderby'   => 'id', 'order'     => 'desc' ); $user_query = new wp_user_query( $args ); 

see order section of wp_user_query codex page


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -