Created
October 8, 2014 19:36
-
-
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)
This file contains 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
// 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