Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Usage example for searchwp_return_orderby_date
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