Favicon causes mixed content warning over SSL

After a little more reading via the WordPress Codex, I discovered that I was calling the favicon incorrectly. It should be called like this:

<link rel="shortcut icon" href="https://wordpress.stackexchange.com/questions/240069/<?php echo get_stylesheet_directory_uri(); ?>/favicon.ico" />

Using get_stylesheet_directory_uri() checks for SSL.

Leave a Comment