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

searchwp_indexer_taxonomies

View Parameters »

By default SearchWP will index all available taxonomies. If you would like to customize which taxonomies are indexed by SearchWP you can use this hook to do so.

To customize which taxonomies are indexed by SearchWP, add something like the following to your theme’s functions.php:

<?php
function my_searchwp_indexer_taxonomies( $taxonomies, $post_being_indexed ) {
// TODO: customize which taxonomies are indexed
return $taxonomies;
}
add_filter( 'searchwp_indexer_taxonomies', 'my_searchwp_indexer_taxonomies', 10, 2 );
view raw gistfile1.php hosted with ❤ by GitHub

Parameters

Parameter Type Description
$taxonomies Array

The taxonomy names to index

$post_being_indexed Object

The post object being indexed

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