Skip to content

Instantly share code, notes, and snippets.

@neverything
Created January 14, 2013 16:00
Show Gist options
  • Save neverything/4531086 to your computer and use it in GitHub Desktop.
Save neverything/4531086 to your computer and use it in GitHub Desktop.
Fixes admin bar issues with the Foundation Top Bar
<?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