-
-
Save amboutwe/36a08f9d369860aec99500726065bd3f to your computer and use it in GitHub Desktop.
WoW @amboutwe thanks for light-fast update :) And cheers to all the team for your great SEO solutions!
By the time I found this thread (Dec 2021) there were a bunch more still! It's easiest to just make your filter function return an empty array, instead of removing one at a time and then having Yoast just add more of the darned things. Here is my filter function which just gets rid of all of them, present and future.
/**
* Remove annoying Yoast social fields from user profile forms.
* @see https://gist.github.com/amboutwe/36a08f9d369860aec99500726065bd3f
*/
public function yoast_seo_admin_user_remove_social($contactmethods)
{
// we want none of them now or in the future!
// return an empty array rather than remove one by one:
return array();
}
How to remove Mastodon field?
unset( $contactmethods['mastodon'] ); - not works for me ((
@factoryofit I tested and updated the code snippet to remove the Mastodon field. Please note that the fields are only removed from the User Profile screen under Admin > Users > Edit user.
If the issue remains for your site, this is not the proper place to request support. Please check out our extensive help section or visit the free support forum. If you require further support, upgrading to our premium version provides you with access to our support team.
@soulshakepower Thanks for the feedback. I updated the code snippet with the priority option.