SearchWP

This Documentation is for SearchWP Version 3

Available since: 3.0

searchwp_custom_field_keys_{$post_type}

View Parameters »

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

<?php
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

Parameters

Parameter Type Description
$meta_keys Array

Meta keys

$post_type String

Post type

[wpforms id="3080"]