Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Created November 21, 2013 13:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jchristopher/7581383 to your computer and use it in GitHub Desktop.
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
<?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