This Documentation is for SearchWP Version 3

Available since: 2.7


On activation, SearchWP implements a default set of settings. If you have a systematic way of implementing SearchWP you may want to customize the defaults, and this hook lets you do just that.

Example: If you would like to customize the default settings used by SearchWP on activation, add something like the following to your theme’s functions.php:

function my_searchwp_initial_engine_settings( $settings ){
// $settings contains all of the default engine settings
// you can customize the weights in any way you see fit
// but do not alter the structure of the array, just values
return $settings;
add_filter( 'searchwp_initial_engine_settings', 'my_searchwp_initial_engine_settings' );
view raw functions.php hosted with ❤ by GitHub