Conditional Logic to Check for Site Icon
From what I've read (Check if Favicon is set in Customizer and others), it appears checking to see if a site icon is set in a theme should be easy. It doesn't seem to be working for me. I'd like to have a set of default site icons set in my theme that can be overwritten if a user uploads a site icon. The code I have now is:
?php
if( false === get_option( 'site_icon', false ) ) {
?
link rel="apple-touch-icon" sizes="57x57" href="?php echo get_stylesheet_directory_uri(); ?/icons/apple-icon-57x57.png"
!-- MORE ICONS OUTPUT HERE --
?php
}
?
This doesn't seem to be working though. Regardless if a site icon is set or not, it will not output. Furthermore, even after deleting an icon from the Customizer section, it stays on the site (even after clearing the site and local cache).
Everything I've read says the site icon should work without any theme support, but it doesn't seem to be working for me. Any insights or something I might be missing?
Topic theme-customizer favicon options Wordpress
Category Web