SHARE
TWEET

Untitled

a guest Sep 17th, 2019 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // add_filter('show_admin_bar','codingeek_show_admin_bar');
  2.  
  3. function codingeek_check_user_validation(){
  4.  
  5.   $current_user = wp_get_current_user();
  6.  
  7.   if ( in_array('subscriber', $current_user)) {
  8.     //have to write code for subscriber
  9.       show_admin_bar( false ); // for hide adminbar
  10.    };
  11.  
  12.   }
  13.  
  14.  
  15. add_action('wp_login','codingeek_check_user_validation');
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top