Skip to content

Instantly share code, notes, and snippets.

@carmoreira
Last active September 6, 2018 14:30
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 carmoreira/583588968144b55687475329b5aaee92 to your computer and use it in GitHub Desktop.
Save carmoreira/583588968144b55687475329b5aaee92 to your computer and use it in GitHub Desktop.
Team Showcase: remove social fields and custom fields
/* To remove social network link fields */
add_filter( 'tshowcase_social_networks', 'tshowcase_custom_social', 99 );
function tshowcase_custom_social( $social ) {
//add the entries you want to delete here
$remove = array( 'yelp', 'imdb', 'youtube' );
foreach ( $social as $key => $value ) {
if ( count( array_intersect( $remove, $value ) ) ) {
unset( $social[ $key ] );
}
}
return $social;
}
/* Remove custom information fields */
add_filter( 'tshowcase_custom_fields', 'tshowcase_custom_fields', 99 );
function tshowcase_custom_fields( $tshowcase_fields ) {
//repeat this line for each of the fields you want to remove
unset( $tshowcase_fields['email'] );
return $tshowcase_fields;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment