Posted By

chrisaiv on 09/13/14


Tagged

wordpress


Versions (?)

Wordpress: Insert a favicon.ico


 / Published in: PHP
 

Insert a favicon using functions.php

  1. /**
  2. * Add a Favicon
  3. * This prevents you from having to worry about updating your theme and losing your favicon.
  4. *
  5. */
  6. function add_favicon(){
  7. echo "<link rel='shortcut icon' href='" . get_stylesheet_directory_uri() . "/favicon.ico' />" . "n";
  8. }
  9. add_action( 'wp_head', 'add_favicon');

Report this snippet  

You need to login to post a comment.