Created
August 3, 2024 14:14
-
-
Save taricco/1f0662e838325509a8a5f38df8e1e5fc to your computer and use it in GitHub Desktop.
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
| /*** Remove frontend WordPress admin bar for users other than Administrators ***/ | |
| add_action('after_setup_theme', 'remove_admin_bar'); | |
| function remove_admin_bar() { | |
| if (!current_user_can('administrator') && !is_admin()) { | |
| show_admin_bar(false); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment