This Documentation is for SearchWP Version 3

Available since: 3.0


View Parameters »

This filter is applied after searchwp_custom_field_keys allowing you to restrict Custom Field meta keys based on post type.

add_filter( 'searchwp_custom_field_keys_page', function( $meta_keys, $post_type ) {
// TODO: Customize $meta_keys to meet your needs.
return $meta_keys; // Array of meta keys to display in Custom Fields dropdown.
}, 20, 2 );
view raw functions.php hosted with ❤ by GitHub


Parameter Type Description
$meta_keys Array

Meta keys

$post_type String

Post type