Last active
September 10, 2019 14:06
-
-
Save Sharifur/1b3cc720a102376edfc4b06ff39a8af5 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
// add_filter('show_admin_bar','codingeek_show_admin_bar'); | |
function codingeek_check_user_validation(){ | |
$current_user = wp_get_current_user(); | |
if ( in_array('subscriber', $current_user)) { | |
//have to write code for subscriber | |
show_admin_bar( false ); // for hide adminbar | |
}; | |
} | |
add_action('wp_login','codingeek_check_user_validation'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment