I am adding Favicons and Icons to my site manually in a more proper way than what WordPress adds by default. My WordPress is generating the below 4 lines of code automatically.
<link rel="icon" href="http://example.com/wp-content/uploads/sites/3/2015/09/cropped-group_logo-32x32.png" sizes="32x32">
<link rel="icon" href="http://example.com/wp-content/uploads/sites/3/2015/09/cropped-group_logo-192x192.png" sizes="192x192">
<link rel="apple-touch-icon-precomposed" href="http://example.com/wp-content/uploads/sites/3/2015/09/cropped-group_logo-180x180.png">
<meta name="msapplication-TileImage" content="http://example.com/wp-content/uploads/sites/3/2015/09/cropped-group_logo-270x270.png">
I tried a lot but could not figure out how to stop WordPress from generating this.
Kindly help
Update:
After using the function provided by @Gareth, I am getting the following error:
Warning: array_filter() expects parameter 1 to be array, null given in C:\xampp\htdocs\example\wp-includes\general-template.php on line 2466
Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\example\wp-includes\general-template.php on line 2468
3 Answers
Finally I found the answer outside of this place, hence I am posting it here as it may be useful to someone like me.
Simply add this to your functions.php file
remove_action ('wp_head', 'wp_site_icon', 99);