Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
What do you mean by an image to represent your blog?
A site image. I believe WordPress calls it a blavatar. I am using Jetpack and in the WordPress reader it just has a generic image. I want to change it.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Is it also called a favicon?
I’m not sure. I can check. Where would I find the option to change that?
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
There are plugins you can use to upload a favicon but it looks like your site already has that
Okay, I’ve read several of these posts, and found the same thing lacking in them all. A complete misunderstanding of what the people mean.
The blavatar, is on the LEFT site of the admin bar, and is not related to changing the favicon.
Multisites also use it, in front of each site name in the admin bar.
There’s css and code for this:
CSS
#wpadminbar .quicklinks li .blavatar {
float: left;
font: normal 16px/1 'dashicons' !important;
speak: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #eee;
}
#wpadminbar .quicklinks li a:hover .blavatar {
color: #45bbe6;
}
#wpadminbar .quicklinks li .blavatar:before {
content: '\f120';
height: 16px;
width: 16px;
display: inline-block;
margin: 6px 8px 0 -2px;
}
CODE
$blavatar = '<div class="blavatar"></div>';
$blogname = $blog->blogname;
if ( ! $blogname ) {
$blogname = preg_replace( '#^(https?://)?(www.)?#', '', get_home_url() );
}
$menu_id = 'blog-' . $blog->userblog_id;
$wp_admin_bar->add_menu( array(
'parent' => 'my-sites-list',
'id' => $menu_id,
'title' => $blavatar . $blogname,
'href' => admin_url(),
) );