Created
July 20, 2017 10:23
-
-
Save Yame-/4a5e798398d62aebaf40d5025b270776 to your computer and use it in GitHub Desktop.
When WordPress Admin Bar has disappeared...
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 | |
// in your functions.php | |
function admin_bar(){ | |
if(is_user_logged_in()){ | |
add_filter( 'show_admin_bar', '__return_true' , 1000 ); | |
} | |
} | |
add_action('init', 'admin_bar' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment