Skip to main contentSkip to footer

A Relevanssi Premium customer bumped into a weird problem with CM Tooltip Glossary (and probably Elementor). Using Elementor, CM Tooltip Glossary and Relevanssi custom excerpts together caused the search results to break in an unusual way: each page of the search results showed the same results.

I couldn’t figure out what’s causing this, but it was this particular combo: disabling CM Tooltip Glossary helped, and so did disabling Relevanssi custom excerpts.

In the end, the solution I came up with was to remove all CM Tooltip Glossary filters on the_content with a simple filter function. This does not affect CM Tooltip elsewhere, but removes this problem:

add_action( 'relevanssi_pre_the_content', 'rlv_disable_cmtt_content_filters' );
function rlv_disable_cmtt_content_filters() {
    global $wp_filter;
    foreach ( array_keys( $wp_filter['the_content']->callbacks ) as $priority ) {
    	$wp_filter['the_content']->callbacks[ $priority ] = array_filter( $wp_filter['the_content']->callbacks[ $priority ], function( $key ) {
    		if ( 'CMTT' === substr( $key, 0, 4 ) ) {
    			return false;
    		}
    		return true;
	    }, ARRAY_FILTER_USE_KEY );
    }
}

Add this to your site.

Your account

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

Search

Popular Resources

Related Posts
Related posts are a popular feature, as it keeps the users engaged and offers them a new direction to continue…
Issues with post order plugins
If you’re getting low-quality results and the weight settings are not affecting the results, the first thing to check is…

Related Posts:

Comment Section:

2 Comments. Leave new

  • Yazan Yousef
    August 6, 2021 2:00 pm

    Very interesting. I happen to also be using CM Tooltip Glossary and Relevanssi Premium, latest version of each, and have not encountered that issue – granted, I don’t use Elementor.

    Reply

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