Posted on

YITH Badge Management

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.

Leave a Reply

Are you a Relevanssi Premium customer looking for support? Please use the Premium support form.

Your email address will not be published. Required fields are marked *