How to Add Favicon to Worpress Administration Page

This article contains information on how I added a favicon to my WordPress Adminstration Page. This was for WordPress 4.1.1 hosted on my Ubuntu 14.04 server. I wanted a favicon because I currently have 18 pinned tabs in firefox and I rely on the favicon image to identify the wordpress tab. The general solution is to add a custom function to identify when you are in the administration menu. This function is added to your current theme in the file functions.php. Commands from the terminal will look like this sentence.

  • Change to the theme directory
    • cd /var/www/cc.com/wordpress/wp-content/themes/twentyfifteen-child
  • Edit functions.php
    • nano functions.php

// The followin code adds a favicon to the wp-admin site
// from http://clarknikdelpowell.com/blog/how-to-use-favicons-on-the-wordpress-admin-login-pages
// First, create a function that includes the path to your favicon
function add_favicon() {
$favicon_url = get_stylesheet_directory_uri() . ‘/admin-favicon.ico’;
echo ‘<link rel=”shortcut icon” href=”‘ . $favicon_url . ‘” />’;

References:

http://clarknikdelpowell.com/blog/how-to-use-favicons-on-the-wordpress-admin-login-pages

My article on creating a favicon and a list of references are located at https://blog.chadchenault.com/2015/01/10/create-a-multiple-resolution-favicon-ico-file-with-a-linux-bash-script/.

 

Leave a Reply

Your email address will not be published. Required fields are marked *