Created
August 10, 2012 19:08
-
-
Save ekka21/3316966 to your computer and use it in GitHub Desktop.
Wordpress: hide acf admin menu
This file contains hidden or 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
/** | |
* Hide ACF menu item from the admin menu | |
*/ | |
function hide_admin_menu() | |
{ | |
global $current_user; | |
get_currentuserinfo(); | |
if($current_user->user_login != 'admin') | |
{ | |
echo '<style type="text/css">#toplevel_page_edit-post_type-acf{display:none;}</style>'; | |
} | |
} | |
add_action('admin_head', 'hide_admin_menu'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment