Posted on

Issues with post order plugins

If you’re getting low quality results and the weight settings are not affecting the results, the first thing to check is to see if your results are coming from Relevanssi in the first place.

That’s easy to check: disable Relevanssi and see if the results change. If the results change, they’re coming from Relevanssi. If the results don’t change, go see this debugging info.

If Relevanssi is powering the search and the results still won’t change when you change the weights (change the weights a lot – for example, if you want to adjust the title weights, set the title weight to 1000), then you may be using a plugin that affects the post order.

One example is Intuitive Custom Post Order, which reorders posts – and the Relevanssi results.

The fix is simple, though. Just add this code to your theme functions.php:

add_filter('relevanssi_orderby', 'rlv_fix_order');
function rlv_fix_order($orderby) {
    $orderby = "relevance";
    return $orderby;
}

This will force the search results order to ordering by relevance.

Leave a Reply

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