Last active
August 29, 2015 14:15
-
-
Save mpukit/dc3709fc34b7d6353624 to your computer and use it in GitHub Desktop.
A fix for the Wordpress admin bar overlaying your theme
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
@mixin wp-admin-bumper { | |
min-height: 46px; // height of mobile wp-admin bar in WP 4.0 | |
@media screen and (min-width: 782px;) { | |
min-height: 32px; // standard height of wp-admin bar in WP 4.0 | |
} | |
} |
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
.wp-admin-bump { | |
@include wp-admin-bumper; | |
} |
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
<!-- Place inside the nav --> | |
<?php if ( is_admin_bar_showing() ) echo '<div class"wp-admin-bump"></div>'; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment