Skip to main contentSkip to footer

Relevanssi has support both for Oxygen and Ninja Tables, but the way the Ninja Tables support is done, it’s not working when used with Oxygen. The Ninja Tables support in Relevanssi is looking for the Ninja Tables shortcodes in the post content, but Oxygen keeps everything in custom fields.

Fortunately, the fix is simple: you can make Relevanssi look for the Ninja Tables shortcodes in the Oxygen custom fields. Add this code to a code snippet:

add_filter( 'relevanssi_custom_field_value', 'rlv_oxygen_ninja', 9, 2 );
function rlv_oxygen_ninja( $values, $field ) {
  if ( 'ct_builder_shortcodes' === $field ) {
	$values = array_map( 'relevanssi_index_ninja_tables', $values );
  }
  return $values;
}

Your account

Not logged in. Log in to see your license details.

Search

Popular Resources

Multi-part excerpts

…the search term appear only once in the document, there’ll be fewer excerpts. Relevanssi also tries to avoid overlapping excerpts and will eliminate excerpts that look too much like excerpts it has already chosen. The different parts will be combined together in the order of relevance: the best part comes……knows that and you can display that information on the search results page: Achieving this is a two-part process. First, add this to your site to modify the excerpt part with the relevanssi_excerpt_part filter to show the source data: add_filter( ‘relevanssi_excerpt_part’, ‘rlv_excerpt_parts’, 10, 2 ); function rlv_excerpt_parts( $excerpt_text, $excerpt )…

Related Posts:

Comment Section:

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed