Updates Overwrite Favicon


Been testing v2 nightly since it was available. When I update to the latest version every day, it overwrites favicon.ico with the ClassicPress version.

Thanks for reporting this, the core files now include a favicon file to suppress console errors seen in the Chrome browser.

I’ll raise this at the weekly core meeting for consideration. I presume you are simply adding a file in the root level of your site.

One option you have is to place your custom favicon in wp-content and use a little bit of code as a custom plugin to in the themes functions.php file to use that location, maybe something like this (note - this is not tested):

add_action( 'wp_head', 'my_favicon' );
function my_favicon() {
    echo '<link rel="shortcut icon" href="' .  content_uri() . '/favicon.ico">';

Thanks for the reply.

Yes, I have both favicon.ico and favicon.png in the root folder. I link to the .png in the head of the site, and browsers that only use .ico automatically find it, which wouldn’t work if it was in another folder. I guess I could put the .ico in another folder and link to that for now. Just seems cleaner to have it in the root folder.

I have a site that does exactly the same as yours. It’s both the cleanest method and the fastest to load. While we consider whether to revert the change in CP or to do something else, I’ve just re-uploaded my own favicon to the root folder again.