Available since: 2.3
searchwp_endpoint
SearchWP’s indexer uses a default endpoint as defined by a call to `site_url()`. If you are running some sort of load balancer and have replaced your site’s home page with a static page, you can modify the endpoint SearchWP’s indexer uses with this hook.
Example: To change the SearchWP indexer endpoint, add the following to your active 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_endpoint() { | |
return 'searchwp'; // will return the equivalent of site_url() . '/searchwp'; | |
} | |
add_filter( 'searchwp_endpoint', 'my_searchwp_endpoint' ); |