Advertisement
firoze

remove default <style></style> of head

Apr 12th, 2015
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. // paste this into your theme functions.php
  2.  
  3. /*
  4. remove default <style></style> of head
  5. */
  6. function remove_admin_login_header() {
  7. remove_action('wp_head', '_admin_bar_bump_cb');
  8. remove_action('wp_footer', '_admin_bar_bump_cb');
  9.  
  10. // this for <style type="text/css" media="print">#wpadminbar { display:none; }</style>
  11. if (! is_user_logged_in() )
  12. add_filter( 'show_admin_bar', '__return_false' );
  13.  
  14. }
  15. add_action('get_header', 'remove_admin_login_header');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement