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, 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. Add this function to your site:

add_filter( 'relevanssi_orderby', function ( $orderby ) {
    return array( 'relevance' => 'desc' );
} );

This will force the search results to order by relevance.

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 *