I will be very grateful for your help!
]]>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.
]]>I’d like to display the most relevant review in one area, then the second most relevant review in another area and so on. You can see what I am doing on the review slider here. https://prospectivehomeinspections.com/#reviews
I’m using shortcode with an offset. While I am getting the five top reviews the order is not updating when the daily API data is retreived. Is there a way to get those top five reviews to match the daily retreaved data?
Also the same thing on this page, https://prospectivehomeinspections.com/reviews/. The plugin is set to display by relevance decending but it’s not updating daily.
Thanks so much!
]]>I can see currently this plugin displays related posts even a single word match it founds in title.
Is it possible to set it to match minimum two/three words, if no two/three words match then don’t display anything.?
It would produce more relevance results if it’s possible.
Kindly guide.
Thanks
Best Regards
Kapil
Synonyms and the ability to look intelligently within custom types and fields (to name a few) just opens up the content in a way that native search does not. This allows us, for example, to easily add words in a custom post field that is reflective of a user’s natural language — an important consideration for e-commerce and directory sites.
Search is a powerful navigational tool in itself and crafting its construct is part of the “invisible” care and attention that we can put into our products to provide exceptional and relevant experiences (for both our clients, and their customers). Relevanssi helps us control this relevance in balance with a client’s business decision to never give a user a dead-end of no results. No results are bad, but irrelevant results can be worse.
The unexpected, swift and selfless support form the author, Mikko, was also a life saver on our last project when we needed that extra bit of genius to make the project great with a very specific query.
]]>The search part wasn’t a problem. I was able to set orderby to relevance and push the custom post type to the top. But I’m having difficulty making this work for tag results (or I suppose for any page that uses archive.php as its template).
Here’s the code I have so far:
add_action( 'pre_get_posts', function( $query ) {
if ( ($query->is_search() || $query->is_tag()) && !is_admin() ) {
$query->set( 'orderby', 'relevance' );
}
});
add_filter( 'posts_search_orderby', function( $search_orderby ) {
global $wpdb;
return "{$wpdb->posts}.post_type LIKE 'companies' DESC, {$search_orderby}";
});
You’ll see I tried adding ‘$query->is_tag()’ as a condition hoping this would be all that’s necessary, but the second function doesn’t affect archives/tag results. I’m guessing there’s a different hook needed to connect with archives instead of posts_search_orderby, but I’m having trouble figuring out what it is. Or maybe my approach is flawed. I’ve done very little with tags and archives, so any insights would be most appreciated. Thank you!
]]>