Skip to content

Instantly share code, notes, and snippets.

@terrytsang
Last active September 11, 2022 09:57
Show Gist options
  • Save terrytsang/ff47210a47f230277720cfdc9e72d26d to your computer and use it in GitHub Desktop.
Save terrytsang/ff47210a47f230277720cfdc9e72d26d to your computer and use it in GitHub Desktop.
Add a new Favicon to your WordPress website
<?php
//add this code to your theme functions.php
// add a favicon
function tt_new_favicon() {
echo '<link rel="favicon" type="image/x-icon" href="https://www.yoursite.com/wp-content/uploads/2022/09/favicon.ico" />';
}
add_action('wp_head', 'tt_new_favicon');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment