relevanssi_forbidden_post_types

apply_filters( 'relevanssi_forbidden_post_types', array $post_types )

Relevanssi removes many post types from the list of post types to index. These are generally back-end post types that are not meant to be publicly accessed. This filter hook controls that list.

Parameters

$post_types
(array) An array of post type names.

More information

WordPress Core has several post types that don’t make sense to index for Relevanssi. These include wp_font_family, wp_template, wp_template_part, revision, and many others. Many popular plugins include these kinds of post types, as well.

Relevanssi has a built-in list of forbidden post types that are not listed as options for indexing. This filter hook filters that list. You can enable forbidden post types, but that’s not useful. This filter hook is better used to remove more post types from the list. To block post types, do this:

add_filter(
  'relevanssi_forbidden_post_types',
  function( $post_types ) {
    return array_merge( $post_types, array( 'unwanted_post_type', 'useless_post_type' ) );
  }
);