Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

How to change favicon

can somone help me pls i want to change my favicon.ico from the website but its doesn't work...

help pls with exactly what i have to do


echo "<link rel='shortcut icon' href='".IMAGES."WoW.ico' type='image/x-icon' />\n";

i change this in maintenance.php from favicon.ico to wow.ico

i have no idea how i make it right pls help me


Mod: clarified subject
/images/favicon.ico

Please Change your thread title to something more descriptive as titles like "need help pls" is violating the Code of Conduct.
The simplest way is to rename your own icon to "favicon.ico" and upload it to your images folder.

If you don't want to do that, open themes/templates/header.php

Find...
CodeDownload  

if (file_exists(IMAGES."favicon.ico")) { echo "<link rel='shortcut icon' href='".IMAGES."favicon.ico' type='image/x-icon' />\n"; }



and change favicon to the name of your icon. You may need to clear your cookies to view it.
Sorry to resurrect this thread, but I followed your instructions with my own icon (http://vivacechoral.com/images/icon.ico) - I renamed it to see if anything would work. I made the following changes to my template header.php:

CodeDownload  
if (file_exists(IMAGES."icon.ico")) { echo "<link rel='shortcut icon' href='icon.ico' type='image/x-icon' />\n"; }



But still, the bluehost icon persists as my favicon. Can you provide further help?
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]if (file_exists(IMAGES."icon.ico"wink) { echo "<link rel='shortcut icon' href='".IMAGES."icon.ico' type='image/x-icon' />\n"; }[/syntaxhighlighter]

Try that, and clear you cache.

Quote

M0rdak wrote:

[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]if (file_exists(IMAGES."icon.ico")) { echo "<link rel='shortcut icon' href='".IMAGES."icon.ico' type='image/x-icon' />\n"; }[/syntaxhighlighter]

Try that, and clear you cache.


Buh... good catch. That worked. Thank you!
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]if (file_exists(IMAGES."favicon.ico"wink) { echo "<link rel='shortcut icon' href='".IMAGES."favicon.ico' type='image/x-icon' />\n"; }
[/syntaxhighlighter]

That code does not appear to work in IE9
This does.
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]<link rel='shortcut icon' href='images/favicon.ico' type='image/x-icon' />[/syntaxhighlighter]
I realise the original poster wanted something else and have a solution, but I dont get why IE9 wont display the first code snippet. Too complex?

... and dont even dare telling me off about browsers and their compatibility or lack thereof.
Well both should work no matter what they are both same codes just the firs on looks to make sure the favicon.ico exists in the images directory that's all.
Maybe better to use
CodeDownload  
href='/images/favicon.ico'

?
Humm..is tere not a dot missing here:

... file_exists(.IMAGES."ico ...

between ( and I

Naa, that would mean three dev guys posted the wrong code one after another. I cant get that lucky :P
Failing all that try...

CodeDownload  

if (file_exists(BASEDIR."images/favicon.ico")) { echo "<link rel='shortcut icon' href='".BASEDIR."images/favicon.ico' type='image/x-icon' />\n"; }



Should make no difference but everything is worth a try and this is coming from me who is NOT a DEV guy. ;)
Compared to me you are a Dev guy. Hey even Borat is a Dev guy.
Ridiculous you can code just fine, you choose not to that is fine, anyway how do you even think about Borat?
Thinking of you, perhaps...? :D
:P It's niiiiiiice but I don't come from kazikstan.
how to clear cache???.i cant change i favicon...

Quote

ChildHold wrote:

how to clear cache???.i cant change i favicon...



Look in the imagesfolder, just owerwrite the existing favicon.ico by yours :)
How to change the favicon without modifying core? You should never modify the core...
Thread Information
Author
Replies
20 posts
Views
21,148 times
Last Post
Last updated on 4 years ago
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
Users who participated in discussion: Homdax, Craig, HobbyMan, dusk, PolarFox, jubo, dimki, M0rdak, Yanagi, ChildHold, pattyland