apply_filters( 'relevanssi_oxygen_section_filters', array $filters )

Filters the Oxygen sections to remove unwanted sections before Relevanssi indexing.


(array) An array of key and value pairs to filter out Oxygen sections.

More information

The Relevanssi Oxygen compatibility code is a filter function on the relevanssi_custom_field_value filter hook. It runs as part of the indexing process and manipulates the contents of the ct_builder_shortcodes custom field (where Oxygen keeps everything) so that it can be indexed correctly.

The process starts by splitting the content into sections based on [ct_section] shortcodes. Each section is then filtered with the filters defined by this hook. You can use these filters to remove unwanted sections. For example, to remove hero images:

add_filter( 'relevanssi_oxygen_section_filters', 'rlv_remove_hero_bg' );
function rlv_remove_hero_bg( $filters ) {
  return array( 'nicename' => 'Hero BG' );

This would filter out all sections that have "nicename":"Hero BG" in the settings.

After that the section content is filtered by relevanssi_oxygen_section_content hook.