Last active
June 27, 2020 01:48
-
-
Save msaari/8c6c62e40b841d07b1961994c3331004 to your computer and use it in GitHub Desktop.
Index TablePress shortcodes in ACF fields
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'relevanssi_custom_field_value', 'rlv_tablepress_in_acf' ); | |
function rlv_tablepress_in_acf( $value ) { | |
$tablepress_controller = relevanssi_enable_tablepress_shortcodes(); | |
$post_before_shortcode = $post; | |
$value[0] = do_shortcode( $value[0] ); | |
$post = $post_before_shortcode; | |
unset( $tablepress_controller ); | |
return $value; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment