Skip to main contentSkip to footer

ThemeCo themes use custom codes for dynamic content. Those are not usual shortcodes, and Relevanssi won’t expand them automatically.

In order to expand the dynamic content from ThemeCo themes, you need to use these filters:

add_filter( 'relevanssi_post_content', 'relevanssi_filter_the_content', 8, 2 );
add_filter( 'relevanssi_pre_excerpt__content', 'relevanssi_filter_the_content', 8, 2 );
function relevanssi_filter_the_content( $post_content, $post ) {
	return apply_filters( 'the_content', $post_content );
}

The critical part is running these filters on an early enough priority for relevanssi_post_content: Relevanssi page builder shortcode cleanup runs on priority 9, and that makes the the_content filters from ThemeCo themes fail. Thus this needs to run before that.

Your account

Not logged in. Log in to see your license details.

Search

Popular Resources

GeneratePress: Query Loop
Relevanssi doesn’t work automatically with the Query Loop block in GeneratePress and GenerateBlocks. Fortunately, the solution is simple: the Query…
Avada
Avada is one of the most popular WordPress themes on the market. All post types are not found Avada has…

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