Skip to main contentSkip to footer

The Premium version of YITH Badge Management has a search feature for badges. Using Relevanssi breaks that badge search. Fortunately, it’s easy to fix. Add this to your site:

add_filter( 'relevanssi_prevent_default_request', 'rlv_yith_badge_management', 10, 2 );
add_filter( 'relevanssi_search_ok', 'rlv_yith_badge_management', 10, 2 );
function rlv_yith_badge_management( $do_stuff, $query ) {
	if ( 'yith-wcbm-badge' === $query->query_vars['post_type'] ) {
		$do_stuff = false;
	}
	return $do_stuff;
}

Now Relevanssi won’t interfere with the YITH Badge Management search.

Your account

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

Search

Popular Resources

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