SearchWP

This Documentation is for SearchWP Version 3

Available since: 1.0

searchwp_force_wp_query

SearchWP works by hijacking WordPress native search. Even when doing that, WordPress will still execute it’s native search query under the hood unless we tell it not to. By default SearchWP disables this additional query because it is effectively replaced with SearchWP’s internal algorithm, so it is an extra database call that does not need to happen. If you find this problematic, you can tell SearchWP to allow WordPress to perform it’s original query.

Example: If you want to have WordPress perform it’s native search query in addition to SearchWP performing it’s internal query, add the following to your active theme’s functions.php:

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