AND logic has been completely refactored to prevent potential false positives. You can also now filter where AND logic is applied. Allow me to explain:

Out of the box, SearchWP applies AND logic to entire posts. That is to say terms can appear in the title, content, excerpt, slug, anywhere. As long as all the terms appear somewhere the post is considered valid. There may be a use case, however, where this is too loose and you want to restrict AND matches to titles only. You can now do that easily by adding the following to your active theme’s functions.php:

function mySearchWPANDFields( $fields )
    $fields = array( 'title' ); // only apply AND to title
    return $fields;
add_filter( 'searchwp_and_fields', 'mySearchWPANDFields' );

Available fields are:

  • title
  • content
  • slug
  • excerpt
  • comment
  • tax
  • meta

Full 1.4.6 changelog:

  • [Improvement] More precise refactor of AND logic to prevent potential false positives
  • [New] New Filter: searchwp_and_fields allows you to limit which field types apply to AND logic (i.e. limit to Title)

Want to make your search awesome right now?

More than 30,000 sites have chosen SearchWP!

You can utilize all of the content that’s gone unrecognized by native WordPress keyword search instantly with SearchWP.

Get SearchWP for just $99

  • Committed Support
    If you need help, support is fast, friendly, and here for you
  • Streamlined Setup
    Installation and setup that’s optimized for speed
  • Great Documentation
    Helpful, clear, and usable documentation is a priority

See what SearchWP customers have to say

  • “With SearchWP, you can add weight to categories, tags, taxonomies and even custom fields. This yields a much better and richer search than the basic WP search. My clients love it.”

  • “SearchWP is the booster WP needs. It converts search in what it should be. Great plugin!”

  • “I love that you can do custom loops with it”

[wpforms id="3080"]