This code snippet goes in your functions.php file and replaces the ‘W‘ WordPress logo with your own 27×27 pixel transparent image.
/* Rebrand the Admin Bar WP Logo */
add_action('wp_before_admin_bar_render', 'no_wp_logo_admin_bar_remove', 0);
function no_wp_logo_admin_bar_remove($wp_admin_bar) {
?>
<style type="text/css">
#wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before {
content: url(YOUR IMAGE URL HERE) !important;
top: 2px;
}
#wpadminbar #wp-admin-bar-wp-logo > a.ab-item {
pointer-events: none;
cursor: default;
}
</style>
<?php
}
In the code snippet there is a place between an open and close parenthesis that has the words ‘Your Image URL Here‘. Replace that text with the URL of your image as shown in the video.
For example, the image url should look like this:
content: url(https://baguiowebs.com/images/login-logo.png) !important;