WordPress wp_head() Auto read CSS issue

I have added wp_head() to head part because plugins require that but when I update any part of the blog in wp-admin blog it automatically adds following new css part inside head

<style type="text/css" media="screen">
    html { margin-top: 28px !important; }
    * html body { margin-top: 28px !important; }
</style>

When I delete path cookies it disappears. Why this happens and how to solve it?

Related posts

Leave a Reply

4 comments

  1. Actually that is being added for the admin bar, to remove the style from the head you can paste this inside your functions.php

    add_filter( 'show_admin_bar', '__return_false' );
    

    but above line will also remove the admin bar from the front end when you are logged in.

  2. The best way I’ve found to remove that white space (it’s not caused by the admin bar) is to search out this css in style.css:

    #page {
    margin: 2em auto;
    max-width: 1000px;
    }
    

    and switch the 2em to 0em or some variation of the same. That will remove the white space.