Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Wordpress Relevanssi search plugin with Oshin theme
/* Additional content from Oshin page builder is not indexed with the Relevanssi search plugin
* The Oshin page builder stores it's content in the 'wp_postmeta' table
* The function adds this content to the relevanssi index
* Oshin: 3.1 (
* Relevanssi: 3.5.2 (
function add_extra_content($content, $post) {
global $wpdb;
$content = $wpdb->get_var("SELECT meta_value FROM wp_postmeta WHERE post_id = $post->ID AND meta_key = '_be_pb_content'");
return $content;
add_filter('relevanssi_content_to_index', 'add_extra_content', 10, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.