SearchWP

This Documentation is for SearchWP Version 3

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

[wpforms id="3080"]