Note: You are viewing the documentation for Version 3View Version 4 Docs

Documentation

View the installation guide, browse the Knowledge Base, find out about SearchWP's many hooks, get support

Available since: 1.1

searchwp_query_main_join

View Parameters »

If you would like to JOIN more tables for the search algorithm parent query, use this filter.

Example: To include your own JOIN, add the following to your active theme’s functions.php:

<?php
function my_searchwp_query_main_join( $sql, $engine ) {
// modify $sql to your liking
return $sql;
}
add_filter( 'searchwp_query_main_join', 'my_searchwp_query_main_join', 10, 2 );
view raw gistfile1.php hosted with ❤ by GitHub

Parameters

Parameter Type Description
$sql String

The default SQL

$engine String

The search engine being used

Fix keyword search on your site. No coding required!

Now you can utilize all of the content that's gone unrecognized by native WordPress keyword search instantly with SearchWP

Get SearchWP