This Documentation is for SearchWP Version 3

Available since: 2.1


View Parameters »

With this hook you can control who has access to view the SearchWP settings screen.

Please note that the WordPress Settings API restricts saving settings to users with the manage_options capability.

If you would like to give users access to view the SearchWP settings and in turn access to the Advanced settings you can add something like the following to your theme’s functions.php:

function my_searchwp_settings_cap( $capability ) {
return 'edit_posts'; // Editors and up
add_filter( 'searchwp_settings_cap', 'my_searchwp_settings_cap' );
view raw gistfile1.php hosted with ❤ by GitHub


Parameter Type Description
$capability String

By default access is restricted to Users with the manage_options capability