Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save joshuacharleslake/1c749a85e552170797ed60b87e24d447 to your computer and use it in GitHub Desktop.
Save joshuacharleslake/1c749a85e552170797ed60b87e24d447 to your computer and use it in GitHub Desktop.
Remove ACF Menu If User Doesn't Match
//Hide ACF except for our user
function remove_acf_menu(){
global $current_user;
if ($current_user->user_login!='wkdcode'){
remove_menu_page( 'edit.php?post_type=acf-field-group' );
}
}
add_action( 'admin_menu', 'remove_acf_menu', 100 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment