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

searchwp_supports_label_{post_type}_{support}

View Parameters »

From time to time WordPress plugins or themes will adapt various content types for entries for their own use. Using this hook you can reflect that adaptation in the label SearchWP uses when adding entry attributes to the engine configuration interface:

<?php
// Update SearchWP 'Comments' label for Products because they're used as Reviews.
// (this is done automatically in the SearchWP WooCommerce Integration Extension)
add_filter( 'searchwp_supports_label_product_comments', function( $label ) {
return 'Reviews';
} );
view raw functions.php hosted with ❤ by GitHub

Parameters

Parameter Type Description
$label String

The label to use

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