Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
fix search ordering, by post_date
  • Loading branch information
jjc16105 committed Aug 30, 2016
1 parent 856a89b commit 38f8386
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions.php
Expand Up @@ -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' );
}
}
}
Expand Down

0 comments on commit 38f8386

Please sign in to comment.