Created
January 14, 2013 16:00
-
-
Save neverything/4531086 to your computer and use it in GitHub Desktop.
Fixes admin bar issues with the Foundation Top Bar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('wp_head', 'admin_bar_fix', 5); | |
function admin_bar_fix() { | |
if( !is_admin() && is_admin_bar_showing() ) { | |
remove_action( 'wp_head', '_admin_bar_bump_cb' ); | |
$output = '<style type="text/css">'."\n\t"; | |
//$output .= 'body.admin-bar { padding-top: 28px; }'."\n"; | |
$output .= 'body.admin-bar .top-bar { margin-top: 28px; }'."\n"; | |
$output .= '</style>'."\n"; | |
echo $output; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment