Skip to content

Instantly share code, notes, and snippets.

@joeyz
Created October 8, 2014 19:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joeyz/4965891fcd538be7909a to your computer and use it in GitHub Desktop.
Save joeyz/4965891fcd538be7909a to your computer and use it in GitHub Desktop.
Add admin css sheet based on user ID(good for hiding admin menu)
// custom admin style sheet
function my_admin_head() {
$whodat = get_current_user_id();
if ($whodat == 2) {
echo '<link href="' .get_bloginfo('stylesheet_directory'). '/css/admin-menu.css" rel="stylesheet" type="text/css">';
}
}
add_action('admin_head', 'my_admin_head');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment