Created
May 6, 2018 10:44
-
-
Save deavy/764ede0015ef903ff1a18b5f96e893b4 to your computer and use it in GitHub Desktop.
Hide Personal Options section from Wordpress Profile screen with CSS only
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 hide_personal_options() { | |
$screen = get_current_screen()->id; | |
if ($screen === 'user-edit') { | |
echo "<style type='text/css'> | |
#your-profile h2:first-of-type, | |
#your-profile h2:first-of-type + table { | |
display: none; | |
} | |
</style>"; | |
} | |
} | |
add_action('admin_head', 'hide_personal_options'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment