Relevanssi, by default, only indexes shortcode content from the post content. Here’s how you can make Relevanssi expand shortcodes in custom fields:
add_filter( 'relevanssi_custom_field_value', 'rlv_expand_shortcodes_in_fields' );
function rlv_expand_shortcodes_in_fields( $values ) {
$new_values = array();
foreach ( $values as $value ) {
$new_values[] = do_shortcode( $value );
}
return $new_values;
}
Add this to your theme functions.php and rebuild the index.
Thread Starter
vchoo
(@vchoo)
This worked, thank you so much!