Available since: 2.6
searchwp_swp_query_args
SWP_Query
has it’s own set of arguments. If you need to filter these arguments to include your own parameters, you can use this hook to do so.
Example: to customize the arguments sent to SWP_Query
, 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_swp_query_args( $args ) { | |
// customize $args as per https://searchwp.com/docs/swp_query/ | |
return $args; | |
} | |
add_filter( 'searchwp_swp_query_args', 'my_searchwp_swp_query_args' ); |