Continue reading How to block searches without a search term

How to block searches without a search term

By default, Relevanssi returns all posts when searching without a search term. That’s the default WordPress behaviour. Sometimes it may not be the wanted behaviour. One reason is performance: returning all results can be very slow. To stop Relevanssi from running when there’s no search term, add this to your site: This little function will…

Read more How to block searches without a search term 2 Comments on How to block searches without a search term
Continue reading Disabling Relevanssi

Disabling Relevanssi

If you need to disable Relevanssi, for example for a particular template, all you need to do is to unhook two filters: remove_filter( ‘posts_request’, ‘relevanssi_prevent_default_request’ ); remove_filter( ‘posts_pre_query’, ‘relevanssi_query’, 99 ); Before versions 4.10.2 (free) and 2.12.2 (Premium), you need to unhook these filters: remove_filter( ‘posts_request’, ‘relevanssi_prevent_default_request’ ); remove_filter( ‘the_posts’,…

Read more Disabling Relevanssi 15 Comments on Disabling Relevanssi