relevanssi_disable_shortcodes_excerpt

apply_filters( 'relevanssi_disable_shortcodes_excerpt', array $problem_shortcodes )

This filter allows you to disable shortcodes for Relevanssi excerpt creation.

Parameters

$problem_shortcodes
(array) An array of shortcode names to disable, default value is array( 'layerslider', 'responsive-flipbook', 'breadcrumb', 'robogallery', 'gravityview', 'wp_show_posts' ).

More information

Sometimes shortcodes don’t play nice with how the Relevanssi excerpts are built. This filter hook offers a solution: it lets you list shortcodes that will be disabled before Relevanssi generates excerpts.

Like you can see from the default values, potential trouble comes from galleries, sliders and other shortcodes that do a lot of content display.

To add a shortcode to the list, do this:

add_filter( 'relevanssi_disable_shortcodes_excerpt', 'rlv_add_shortcode' );
function rlv_add_shortcode( $shortcodes ) {
  return array_merge( $shortcodes, array( 'new_shortcode', 'another_shortcode' ) );
}

To disable shortcodes in Relevanssi indexing, use relevanssi_disabled_shortcodes.