Created
July 13, 2018 21:56
-
-
Save gareth-gillman/b838766fe74f4dca6fb7f607685e70b4 to your computer and use it in GitHub Desktop.
WordPress Hide admin elements
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
function prefix_admin_hide_contents() { | |
$admin_user = wp_get_current_user(); | |
if( $admin_user->ID != '5' ) { | |
echo '<style>'; | |
echo '.element { display: none; }'; | |
echo '</style>'; | |
} | |
} | |
add_filter( 'admin_head', 'prefix_admin_hide_contents' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment