apply_filters( 'relevanssi_do_not_index_term', boolean $block, WP_Term $term, string $taxonomy )

Controls whether a taxonomy term is indexed or not.


(boolean) If true, Relevanssi does not index this term. Default false.

(WP_Term) The term object.

(string) The term taxonomy name.

More information

This filter hook works like relevanssi_do_not_index, but for taxonomy terms (and only in Relevanssi Premium, because taxonomy term indexing is not available in the free version).

If you want to avoid indexing specific terms, this filter hook can be used to control the term indexing. For example, to index all terms in the animals taxonomy, except the child terms of the term bugs (with the term ID 53), you can do:

add_filter( 'relevanssi_do_not_index_term', 'rlv_animal_control', 10, 3 );
function rlv_animal_control( $block, $term, $taxonomy ) {
  if ( 'animals' !== $taxonomy ) {
    return $block;
  if ( 53 === $term->parent ) {
    $block = true;
  return $block;