Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Created January 15, 2021 12:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jchristopher/ac7474d11d9c2bcef3291f137aa48244 to your computer and use it in GitHub Desktop.
Save jchristopher/ac7474d11d9c2bcef3291f137aa48244 to your computer and use it in GitHub Desktop.
Customize the SearchWP Query arguments used for REST requests
<?php
// Customize the SearchWP Query arguments used for REST requests.
add_filter( 'searchwp\rest\args', function( $args, $params ) {
// $args are sent to \SWP_Query after this.
// @link https://searchwp.com/documentation/classes/swp_query/
return $args;
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment