Created
March 2, 2012 15:47
-
-
Save wpbandit/1959260 to your computer and use it in GitHub Desktop.
WP Move Admin 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 to wp_head | |
add_action('wp_head','move_admin_bar_bottom'); | |
// Move admin bar to bottom of page | |
function move_admin_bar_bottom() { | |
if(is_user_logged_in()) { | |
echo " | |
<style type='text/css'> | |
* html body { margin-top: 0 !important; } | |
body.admin-bar { margin-top: -28px; padding-bottom: 28px; } | |
body.wp-admin #footer { padding-bottom: 28px; } | |
#wpadminbar { top: auto !important; bottom: 0; } | |
#wpadminbar .quicklinks .ab-sub-wrapper { bottom: 28px; } | |
#wpadminbar .quicklinks .ab-sub-wrapper ul .ab-sub-wrapper { bottom: -7px; } | |
</style> | |
"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment