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

searchwp_is_used_taxonomy

View Parameters »

Note: Use of this hook will require a manual reindex

When indexing taxonomy terms, SearchWP will check to make sure that a taxonomy is in use by engine configuration before indexing it. This is done to keep the index as small as possible. You can use this hook to control whether SearchWP thinks a particular taxonomy is in use:

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

<?php
add_filter( 'searchwp_is_used_taxonomy', function( $used, $taxonomy ) {
// TODO: Determine whether the taxonomy is in use.
return $used; // true/false
}, 20, 2 );
view raw functions.php hosted with ❤ by GitHub

Parameters

Parameter Type Description
$used Boolean

Whether the taxonomy is in use

$taxonomy String

Taxonomy  name

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