Last active
June 26, 2017 22:08
-
-
Save samonja/26b34af440248bb4789a34e3909f1052 to your computer and use it in GitHub Desktop.
Add a Custom Dashboard Logo
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
function sm_custom_logo() { | |
echo ' | |
<style type="text/css"> | |
#wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before { | |
background-image: url(' . get_bloginfo('stylesheet_directory') . '/images/custom-logo.png) !important; | |
background-position: 0 0; | |
color:rgba(0, 0, 0, 0); | |
} | |
#wpadminbar #wp-admin-bar-wp-logo.hover > .ab-item .ab-icon { | |
background-position: 0 0; | |
} | |
</style> | |
'; | |
} | |
//hook into the administrative header output | |
add_action('wp_before_admin_bar_render', 'sm_custom_logo'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment