Created
January 29, 2020 20:24
-
-
Save flexseth/0e604754034f01de6e3f21f315093c96 to your computer and use it in GitHub Desktop.
Disable default admin bar in WordPress
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
<?php | |
add_action("user_register", "set_user_admin_bar_false_by_default", 10, 1); | |
function set_user_admin_bar_false_by_default($user_id) { | |
update_user_meta( $user_id, 'show_admin_bar_front', 'false' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment