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.6

searchwp_settings_nav_tab

SearchWP’s settings header includes tabs for all SearchWP settings screen. This action is used to insert a tab into that header navigation.

<?php
// Add custom SearchWP settings tab
add_action( 'searchwp_settings_nav_tab', function() {
if ( current_user_can( 'manage_options' ) ) {
searchwp_get_nav_tab( array(
'tab' => 'custom', // tab name
'label' => __( 'My Custom Tab', 'searchwp' ), // tab label
) );
}
}, 300 ); // priority controls placement of tab among other tabs
view raw functions.php hosted with ❤ by GitHub
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