Available since: 2.8.7
searchwp_indexer_taxonomy_term_index_slug
View Parameters »Note: Use of this hook will require a manual reindex
By default SearchWP indexes only the taxonomy term name when indexing taxonomies that have been added to any engine configuration. A common need is to also index the taxonomy term slug as well, which you can do by adding this to your theme’s functions.php
:
<?php | |
// Tell SearchWP to index taxonomy term slugs alongside the taxonomy term name. | |
add_filter( 'searchwp_indexer_taxonomy_term_index_slug', '__return_true' ); |
Parameters
Parameter | Type | Description |
---|---|---|
$index_slug |
Boolean |
Whether to index the term slug |
$context |
Array |
|