Created
January 21, 2015 14:14
-
-
Save jchristopher/5761e132b2b391707d5e to your computer and use it in GitHub Desktop.
Usage example for searchwp_return_orderby_date
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_searchwp_return_orderby_date( $order_by_date, $engine ) { | |
// for the Default engine (only!) we want to return search results by date | |
if ( 'default' == $engine ) { | |
$order_by_date = true; | |
} | |
return $order_by_date; | |
} | |
add_filter( 'searchwp_return_orderby_date', 'my_searchwp_return_orderby_date', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment