Available since: 2.4.8
searchwp_query_offset
SearchWP handles pagination internally, but if you would like to change the offset used when querying for results, add something like the following to your theme’s functions.php
:
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_query_offset( $offset, $engine, $terms, $paged ) { | |
// manipulate the offset in any way you'd like | |
return $offset; | |
} | |
add_filter( 'searchwp_query_offset', 'my_searchwp_query_offset', 10, 3 ); |