Categories

How to change Favicon Joomla 1.5

That cosmetic change can be easily made in couple minutes.

First way (simple one) to do that is swapping an existing icon file to one that you chosen. You can find favicon file in:

“YOUR_SITE/templates/YOUR_TEMPLATE/”

Upload your “favicon.ico” file to that directory and overwrite the old icon file.

Second way ( advenced) to do that is editing

“YOUR_SITE//libraries/joomla/document/html/html.php”

In html.php at line 343 you should find code like this:

// Try to find a favicon by checking the template and root folder
$path = $directory . DS;
$dirs = array( $path, JPATH_BASE . DS );
foreach ($dirs as $dir )
{
$icon = $dir . 'favicon.ico';
if (file_exists( $icon ))
{
$path = str_replace( JPATH_BASE . DS, '', $dir );
$path = str_replace( '\\', '/', $path );
$this->addFavicon( JURI::base(true).'/'.$path . 'favicon.ico' );
break;
}
}

Reaplece “favicon.ico” with your file. It can be any type of file for example: icon.jpg, image.gif. Don’t forget to upload your new file to the directory:

“YOUR_SITE/templates/YOUR_TEMPLATE/”

That’s it:)

WordPress Website Icon

Hello

As first post something useful and easy to do. We’re going to change favicon of our blog.

If you already have image you want to use as an icon make sure it is square for example: 128 x 128 px. Files’ extension doesn’t need to be *.ico, that will works with *.jpg and *.gif as well.

If you don’t have your icon you can easily make one on:

http://www.rw-designer.com/online_icon_maker.php.


Upload your favicon file to yours blog root directory. Next you need to edit header.php file of your template. You’ll find it in “/wp-content/themes/YOUR_THEME/header.php”. Simply put this code  into header.php:

<link rel="shortcut icon" href="YOUR_ICON" />

Save changes and it’s done:)