Last active
September 6, 2018 14:30
-
-
Save carmoreira/583588968144b55687475329b5aaee92 to your computer and use it in GitHub Desktop.
Team Showcase: remove social fields and custom fields
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
/* 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