Created
April 30, 2020 10:00
-
-
Save Daniel-Walsh/814d2c9f3580a121900e15e8f94c4b4b to your computer and use it in GitHub Desktop.
Add a custom favicon to wp-admin #wordpress #php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Adds a custom PNG favicon the the wp-admin area of WordPress. | |
add_action( | |
'admin_head', | |
function () { | |
echo '<link rel="icon" type="image/png" sizes="16x16" href="' . get_template_directory_uri() . '/favicon.png">'; | |
} | |
); | |
// Adds a custom ICO favicon the the wp-admin area of WordPress. | |
add_action( | |
'admin_head', | |
function () { | |
echo '<link rel="icon" type="image/x-icon" sizes="16x16" href="' . get_template_directory_uri() . '/favicon.ico">'; | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment