how to delete margin-top: 32px !important from twenty twelve how to delete margin-top: 32px !important from twenty twelve wordpress wordpress

how to delete margin-top: 32px !important from twenty twelve


function remove_admin_login_header() {    remove_action('wp_head', '_admin_bar_bump_cb');}add_action('get_header', 'remove_admin_login_header');


Add the following function to your functions.php file

function my_function_admin_bar(){ return false; }add_filter( 'show_admin_bar' , 'my_function_admin_bar');


A better way to do this is to add theme support for the admin bar with a callback of "return false", then Wordpress wont ever trigger the _admin_bar_bump_cb action which is responsible for adding in the margin-top:32px.

add_theme_support( 'admin-bar', array( 'callback' => '__return_false' ) );