Created
November 21, 2013 13:14
-
-
Save jchristopher/7581383 to your computer and use it in GitHub Desktop.
Use searchwp_custom_field_keys in SearchWP to customize the Custom Fields listed on the Settings screen
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 | |
function mySwpCustomFields( $keys ) { | |
// $keys is an array of Custom Field keys | |
// I want to add 'sku' to that list | |
$keys[] = 'sku'; | |
// I need to return my customized array back to SearchWP | |
return $keys; | |
} | |
add_filter( 'searchwp_custom_field_keys', 'mySwpCustomFields' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment