Community Forums › Forums › General Discussion › Dashboard Logo
This topic contains 4 replies, has 2 voices, and was last updated by manavecplan 3 months, 3 weeks ago.
-
AuthorPosts
-
January 26, 2013 at 11:37 am #15033
Pure vanity but have been trying to brand my dashboard a bit more.
Picked up the php below from Smashing Magazine but have checked it against a few other sites too. So I know it works…
My dashboard logo(to replace WordPress) is located here: http://www.cityslick.in/custom/img/dashboard-logo.png but the code never fires.
A little help?
//ADMIN: Custom dashboard logo function new_admin_logo() { echo '<style type="text/css">#header-logo { background-image: url('.get_bloginfo('template_directory').'/images/dashboard-logo.png) !important; }</style>'; } add_action('admin_head', 'new_admin_logo');January 26, 2013 at 4:26 pm #15124I use this plugin and it customizes much more.
http://wordpress.org/extend/plugins/erident-custom-login-and-dashboard/
Twitter Handles: @thecre8tivediva | Website: Cre8tiveDiva.com | LinkedIn Group: http://goo.gl/nNe1m
Why Not Take The Challenge! – Help us answer some of the unanswered postsJanuary 27, 2013 at 9:35 am #15298Thanks for replying Anita!
While you’re absolutely correct in that the plugin you’ve mentioned customizes a lot more, I’m just looking to get the dashboard logo activated.
The plugin has a ton of other code which I don’t really need…and my rule of thumb is to minimize the plugins I load on any of my sites.
I think the reason the logo doesn’t display in the dashboard is because of where the png file has been saved…but I can’t pinpoint the ideal location.
As of now, my customisations are being run from a folder called ‘custom’ in the root.
January 27, 2013 at 10:00 am #15304I used
FirefoxFirebug and it’s somewhere in the wp-admin/load-styles.php file. The image is actually a sprite.
Twitter Handles: @thecre8tivediva | Website: Cre8tiveDiva.com | LinkedIn Group: http://goo.gl/nNe1m
Why Not Take The Challenge! – Help us answer some of the unanswered postsJanuary 27, 2013 at 1:06 pm #15365Almost have it nailed…the following code works.
//ADMIN: Custom dashboard logo function custom_logo() { echo ' <style type="text/css"> #wp-admin-bar-wp-logo > .ab-item .ab-icon { background-image: url(<a href="http://www.cityslick.in/custom/img/dashboard-logo.png" rel="nofollow">http://www.cityslick.in/custom/img/dashboard-logo.png</a>) !important; background-position: 0 0; } #wpadminbar #wp-admin-bar-wp-logo.hover > .ab-item .ab-icon { background-position: 0 0; } </style> '; } add_action('admin_head', 'custom_logo');The only niggle I have left is the size of the logo itself. For some reason, WordPress seems to be expanding my 20px x 20px logo to 30px x 30px. Hopefully, it’s just a cache issue…
-
AuthorPosts
You must be logged in to reply to this topic.