Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ulziibat-n/245f6e96dd9d5c01f34d16c444c0bc1c to your computer and use it in GitHub Desktop.
Save ulziibat-n/245f6e96dd9d5c01f34d16c444c0bc1c to your computer and use it in GitHub Desktop.
// 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