Hi, bhaldie
I quote the theme developer comments about your latest post:
“Yes, our framework uses get_the_excerpt() function instead, which strips tags and shortcodes to avoid corrupting layouts, because raw HTML from excerpts can break it. For some reason this filter doesn’t work with your plugin content. I tried to override this function in child theme but it works only for WordPress posts, not for these posts, please ask developers of your plugin to fix this issue. I tried next code, it can help them to investigate the issue:
function child_get_the_excerpt($text) {
$raw_excerpt = $text;
if ( '' == $text ) {
$text = get_the_content('');
$text = strip_shortcodes( $text );
$text = apply_filters('the_content', $text);
$text = str_replace(']]>', ']]>', $text);
$allowed_tags = '';
$text = strip_tags($text, $allowed_tags);
$excerpt_word_count = 15;
$excerpt_length = apply_filters('excerpt_length', $excerpt_word_count);
$excerpt_end = '[...]';
$excerpt_more = apply_filters('excerpt_more', ' ' . $excerpt_end);
$words = preg_split("/[\n\r\t ]+/", $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY);
if ( count($words) > $excerpt_length ) {
array_pop($words);
$text = implode(' ', $words);
$text = $text . $excerpt_more;
} else {
$text = implode(' ', $words);
}
}
return apply_filters('wp_trim_excerpt', $text, $raw_excerpt);
}
add_filter('get_the_excerpt', 'child_get_the_excerpt', 5);
Can you help?
Thanks,
Pedro