Note: You are viewing the documentation for Version 3View Version 4 Docs

Documentation

View the installation guide, browse the Knowledge Base, find out about SearchWP's many hooks, get support

Available since: 2.1

searchwp_settings_cap

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:

<?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

Parameters

Parameter Type Description
$capability String

By default access is restricted to Users with the manage_options capability

Fix keyword search on your site. No coding required!

Now you can utilize all of the content that's gone unrecognized by native WordPress keyword search instantly with SearchWP

Get SearchWP