WpCode.net

Daily Wordpress Code Snippet

How to move new wp 3.1 admin Bar at the bottom

| 0 comments

Pin It

Using this simple css trick you will be able to move “Wordpress Admin Bar” at the bottom of the page.

You just need to add the code into your theme’s function.php or put it in a php file as a standalone plugin.

This code interest user side template and also admin side template, to exclude the first or the secondo just remove the relative action.

Add the following css to the function.php Continue reading

function wpc_bar_bottom() { ?>
	<style type="text/css">
		body {
			margin-top: -28px;
			padding-bottom: 28px;
		}
		body.admin-bar #wphead {
			padding-top: 0;
		}
		body.admin-bar #footer {
			padding-bottom: 28px;
		}
		#wpadminbar {
			top: auto !important;
			bottom: 0;
		}
		#wpadminbar .quicklinks .menupop ul {
			bottom: 28px;
		}
	</style>
<?php }
// user area
add_action( 'admin_head', 'wpc_bar_bottom' );
// public area
add_action( 'wp_head', 'wpc_bar_bottom');

Thanks to Digwp.com

Leave a Reply

Required fields are marked *.

*