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

Controlling attachment types in index

…which lets you control which posts are indexed. You can use the attachment MIME type to see which kind of attachment it is and use that information to weed out unwanted attachments. No images To remove all image attachments from the index, add this code to your site and rebuild……the index. It will weed out all attachments that have a MIME type that begins with image. add_filter( ‘relevanssi_indexing_restriction’, ‘rlv_no_image_attachments’ ); function rlv_no_image_attachments( $restriction ) { global $wpdb; $restriction[‘mysql’] .= ” AND post.ID NOT IN (SELECT ID FROM $wpdb->posts WHERE post_type = ‘attachment’ AND post_mime_type LIKE ‘image%’ ) “; $restriction[‘reason’]…

A New Chapter for Relevanssi
We are very excited to announce that Relevanssi has found a new home with comesio solutions GmbH, a software company…

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