Available since: 1.4.6
searchwp_and_fields
View Parameters »By default, SearchWP checks all field types when performing AND logic, but you can customize which field types are considered if you’d like.
Example: To have SearchWP only consider post titles and main content when performing AND logic, add the following to your active theme’s functions.php
:
<?php
function my_searchwp_and_fields() {
return array( 'title', 'content' );
}
add_filter( 'searchwp_and_fields', 'my_searchwp_and_fields' );
Parameters
Parameter | Type | Description |
---|---|---|
$and_field_defaults |
Array |
The default field types considered during |