Answers for "change the dashboard logo in wordpress without plugin"

Go
0

change the dashboard logo in wordpress without plugin

function wpb_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', 'wpb_custom_logo');
Posted by: Guest on January-06-2021

Code answers related to "change the dashboard logo in wordpress without plugin"

Browse Popular Code Answers by Language