SearchWP

Available since: 1.9

searchwp_force_run

By default SearchWP will only hijack the array of posts objects returned if these conditions are met:

  • Not in the WordPress Admin (is_admin())
  • A search is taking place (is_search())
  • It is the main query (is_main_query())

If you would like to override the second item in that list, add the following to your theme’s functions.php:

<?php
add_filter( 'searchwp_force_run', '__return_true' );
view raw gistfile1.php hosted with ❤ by GitHub

You will only want to use this filter in the context of some other condition being met, else SearchWP will fire for every WP_Query that takes place.