Available since: 2.9.10
searchwp_and_fields_{$post_type}
View Parameters »This hook runs prior to searchwp_and_fields
and accomplishes the same goal, but with additional context. The return value of this hook will be inherited by searchwp_and_fields
.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'searchwp_and_fields_post', function( $and_fields, $engine ) { | |
// TODO: Customize $and_fields to match what you want for Posts (and not other post types). | |
// @link https://searchwp.com/docs/hooks/searchwp_and_fields/ | |
return $and_fields; | |
}, 20, 2 ); |
Parameters
Parameter | Type | Description |
---|---|---|
$and_fields |
Array |
The default field types considered during |