Snippet doesn't work fully
-
Hi, I’m using this plugin along with the Genesis Framework theme, and a Genesis child theme that has its own functions.php funtionality. I prefer to use Code Snippets however.
I’ve encountered something odd with one snippet of code though – see below. When I add this code to my theme’s own functions.php, it works perfectly (it removes all of the mentioned profile fields from the User profile page).
But if I remove it from my theme’s functions.php and add it to Code Snippets instead, it only removes the AIM, YIM and Jabber fields, but does not remove the Google+ or Twitter fields. I have no idea why. Can anyone offer a reason?
Here’s the code:
function hide_profile_fields( $contactmethods ) { unset($contactmethods['aim']); unset($contactmethods['yim']); unset($contactmethods['jabber']); unset($contactmethods['googleplus']); unset($contactmethods['twitter']); return $contactmethods; } add_filter('user_contactmethods','hide_profile_fields',10,1);
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Snippet doesn't work fully’ is closed to new replies.