SearchWP

This Documentation is for SearchWP Version 3

Available since: 1.3

searchwp_search_query_order

By default SearchWP returns results ordered by relevance (as defined by you via the keyword weights set in the SearchWP settings) in DESC (descending) order. If you wish to modify the order you can add something like the following to your theme’s functions.php:

<?php
function my_searchwp_search_query_order() {
return 'ASC';
}
add_filter( 'searchwp_search_query_order', 'my_searchwp_search_query_order' );
view raw gistfile1.php hosted with ❤ by GitHub