SearchWP

This Documentation is for SearchWP Version 3

Available since: 1.3.2

searchwp_and_logic

When SearchWP performs a search it takes a first pass at the index using AND logic if multiple terms are present. It often reduces the potential results pool generating more limited (but more relevant) results. If no results are found during the AND pass, SearchWP will take another pass at the index using OR logic, which is more resource intensive and includes a larger pool of results.

If you would like to skip the AND pass you can use this filter to do so.

Example: To have SearchWP skip checking for AND results, add the following to your active theme’s functions.php:

<?php
add_filter( 'searchwp_and_logic', '__return_false' );
view raw gistfile1.php hosted with ❤ by GitHub
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]