A favicon for a website is an icon that shows up on the webpage tabs and bookmarks. Here’s an example:
Look familiar? Previously for another site, I put my own favicon in the root directory and, by magic, it just worked. For some WordPress sites, it’s a little more complicated.
Ingredients
- Image (PNG, JPG, BMP, ICO) – I’ll assume that you already have a small image.
- WordPress – You probably guessed you might need this because of the title.
Instructions
- Create .ICO file. If your small image (PNG, JPG, or BMP) isn’t already an .ico, go to: http://icoconvert.com/ For the icon format, choose Favicon.
-
Upload .ICO file. Fire up
WordPress. Go toMediaAdd Newand then drag themyicon.icoin to theDrop files here.myicon.icoshould be in theMedia Library. Click onmyicon.icoand look for the URL address for the favicon listed on the right. You’ll need the URL address in the next part. Copy and paste it somewhere or go Old School and write it down on paper. -
Add Favicon Code to Theme. You’re going to need to edit
header.phpThe problem is that every time the theme is updated, you’re going to have to edit the header file again. An option to this would be to use a Child Theme. In my particular case, the child theme exists, but doesn’t containheader.phpTo take care of this for my child theme, I just copied the header file from the parent folder directly into the child folder.Go to
Appearancein the WP Dashboard and selectEditor.
To the right, make sure you have the right theme selected and click onHeader
On the last line between<head>and</head>, add:<<link rel="shortcut icon" type="image/x-icon" href="http://www.mysite.com/myWPdirectory/wp-content/uploads/2015/08/myicon.ico">
The http address is the URL that you got from the media library file.
Don’t forget to save your changes.
