• Resolved appleasha

    (@appleasha)


    I will preface this by saying I am not very computer-savvy, but I am not sure where else to get help from.

    The Relevanssi plugin used to work just fine on my site. Recently I noticed the search results are completely off, and the results that are shown on my live site are not what are shown when I do an admin search.

    A specific example: I have a post titled “Dreamy ideas for floral wedding decor”. Even if I search this exact title, the post does not get displayed until the 27th search result. I have the weight for title match set higher than anything else. When I use an admin search, the post shows up as the first result like it should.

    I’m not sure how long this has been a problem for, I’m just noticing it now. I have reindexed all posts with no change. As far as I can tell, no other plugins are interfering with the search function. I don’t know how to make sure that my theme is showing the results from Relevanssi like it does in the admin search. I am using Showit as my theme.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Looks like something may be overriding the post order, as I can get the “Dreamy ideas” post to come up first when force the search to order posts by relevance.

    Add this to your theme functions.php or in a code snippet:

    add_filter( 'relevanssi_modify_wp_query', function( $q ) {
      $q->set( 'orderby', 'relevance' );
      return $q;
    } );

    This should fix the order of the posts.

    Thread Starter appleasha

    (@appleasha)

    Thank you so much, that worked perfectly!! I am so grateful for your help, thank you for your response!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Theme not using Relevanssi’ is closed to new replies.