Skip to content

Instantly share code, notes, and snippets.

View craigcallen's full-sized avatar

Craig Allen craigcallen

View GitHub Profile
@craigcallen
craigcallen / wordpress_yoast_seo_remove_social_fields_and_hide_settings.php Wordpress Yoast SEO - Remove user Social fields and Hide Yoast Profile settings (for non-Administrators)
<?php
if (!current_user_can('manage_options')) {
add_filter('user_contactmethods', 'fn_yoast_seo_remove_user_social_fields',99);
}
function fn_yoast_seo_remove_user_social_fields ( $contactmethods ) {
unset( $contactmethods['facebook'] );
unset( $contactmethods['instagram'] );
unset( $contactmethods['linkedin'] );