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

Keyword-based search blocking
Update: In Premium 2.15.0 and later versions, you can do spam blocking from Relevanssi settings. Just navigate to the Spam…
Pin a post for all searches
Relevanssi Premium has tools for pinning posts for specific queries and all searches where the post appears, but what if…
WooCommerce: Return only exact matches for SKU searches

This little filter function works on relevanssi_hits_filter. When a search query is made that matches an SKU (or any other custom field, but SKUs are the most likely scenario here), only results that match the SKU will be returned. For this to work, Relevanssi must be set to index the…

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