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: 3.0.4

searchwp_is_attribute_used

View Parameters »

SearchWP’s engine configuration is based primarily on entry attributes. Each attribute has an associated, individual weight which allows SearchWP’s results to be finely tuned when applicable. To keep its index as small as possible SearchWP will index only content that has been added to a post type within an engine configuration.

Note: This applies to all post types across all engines.

If you’d like to override SearchWP’s internal handling of a used attribute, you can do so with this hook:

<?php
add_filter( 'searchwp_is_attribute_used', function( $used, $attribute ) {
// TODO: Customize $used where applicable. $attribute is the attribute being evaluated.
return $used; // true/false
}, 20, 2 );
view raw functions.php hosted with ❤ by GitHub

Parameters

Parameter Type Description
$used Boolean

Whether the attribute is used

$attribute String

Attribute being evaluated

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