By default, WordPress displays its own logo in the top left corner of the toolbar (so-called adminbar). If you want to remove it, you can do so either with the plugin Remove WP Branding or programmatically in this way:
function cwhf_remove_logo_wp_toolbar() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu( 'wp-logo' );
}
add_action( 'wp_before_admin_bar_render', 'cwhf_remove_logo_wp_toolbar', 0 );
Change WordPress logo in toolbar
If you want to display a different logo instead, use the following code:
function cwhf_replace_logo_in_admin_bar() {
echo '
<style type="text/css">
#wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before {
background-image: url("https://my-domain.com/wp-content/uploads/my-favicon.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>
';
}
add_action('wp_before_admin_bar_render', 'cwhf_replace_logo_in_admin_bar');