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

Co-authors Plus
Co-Authors Plus is a neat plugin that makes it possible to have multiple authors for one post in WordPress. This…
Moving the admin search page

Jules Colle came up with a method of moving the Relevanssi admin search page from under the Dashboard heading to the top level of the admin menu. add_action( ‘admin_menu’, function () { remove_submenu_page( ‘index.php’, ‘relevanssi_admin_search’ ); add_menu_page( ‘Search all content’, ‘Search all content’, ‘manage_options’, ‘relevanssi_admin_search’, ‘relevanssi_admin_search_page’, ‘dashicons-search‘, 2 ); },……introduced. This filter hook lets you add new admin page hooks where Relevanssi javascript is used, so we can introduce our new admin search page: add_filter( ‘relevanssi_acceptable_hooks’, function( $hooks ) { $hooks[] = ‘toplevel_page_relevanssi_admin_search’; return $hooks; } ); Now we have a nice, functioning admin search that is not hidden:……99 ); This function adds an admin_menu action that first uses remove_submenu_page() to remove the existing admin search function and then add_menu_page() to add it again on the top menu level. This works well except for one thing. The Relevanssi admin javascript is added only to specific pages, and the…

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