Posted on

Yoast Local SEO compatibility issues

Yoast Local SEO plugin breaks Relevanssi search. It enhances the search by adding meta queries. Unfortunately they don’t work with Relevanssi. The fix is simple, though:

add_filter('relevanssi_modify_wp_query', 'rlv_meta_fix', 99);
function rlv_meta_fix($q) {
	$q->set('meta_query', '');
	return $q;
}

This clears out the meta_query.

11 comments Yoast Local SEO compatibility issues

  1. Put this in my functions.php and it still doesn’t work – the results are still blank! Whenever I disable Yoast Local, everything works fine, when I enable it, blank search. Any suggestions? Using Genesis WP Theme

  2. Hi, I did that code, you mentioned below and it prints:

    array(0) {}

    I have themeforest’s Belief Theme, and I can see their template builder has layout settings for the search page (adjusted to “default” template here)

    I disabled ACF and Yoast SEO, still the results come out blank like in this attachment.

    I can see the index is working fine on the settings page, but no results after searching on the front end

    What should I try?

    1. I took the print while trying something to make Relevanssi work, don’t mind the “blog page” header, it reads “Search Results” normally here but no results. if I disable Relevanssi, search results appear normally

  3. Hello Mikko, firstly: I’m very happy with your plugin!
    I have added this piece of code because I’m using Yoast. What I can’t understand: this works perfectly on 1 website (www.timhupkes.com/shop) but not at all on the basic website (www.timhupkes.com). It doesn’t find 1 word..! I have no idea what I could possibly do to improve matters… I’m using the theme Twenty Sixteen.

Leave a Reply

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