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

  • “My website contains an archive of digitised historic journals – hundreds of PDFs. Using Search WP allowed me to build an advanced search, index all PDF content, and returning matching results in a highly customisable format. Top notch support too!”

  • “we use searchwp on numerous projects, as it is a well coded plugin that extends wordpress on vital functions for data-heavy websites.”

  • “We needed to index a website with lots of page content and woocommerce products. SearchWP delivers a lot of useful default functions and setting up was easy with the help of the extensive documentation.”

[wpforms id="3080"]