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/
  • Edit functions.php
    • nano functions.php

// The followin code adds a favicon to the wp-admin site
// from
// 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 . ‘” />’;


My article on creating a favicon and a list of references are located at


Leave a Reply

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