Jump to content

Site Icon


Joe_H
 Share

Recommended Posts

How do you set a site icon (i.e. in browser tabs etc.)? Where is the favicon.ico file put and in what file is the html link to it inserted? I cannot find anything online on this. I have tried just putting the file into the root and not referring to it as apparently the browsers will pick it up automatically but that isn't happening.

Thanks in advance

Joe

Link to comment
Share on other sites

42 minutes ago, Joe_H said:

I have tried just putting the file into the root and not referring to it as apparently the browsers will pick it up automatically but that isn't happening.

That should be happening if you put it next to ProcessWire’s index.php unless the server refuses access or something. Look at the browser console. It probably shows an error trying to load https://www.example.com/favicon.ico.

But you can also put it anywhere and add a link tag in your head, such as:

<link rel="icon" type="image/x-icon" href="<?php echo $config->urls->templates?>style/favicon.ico"/>

 

  • Like 1
Link to comment
Share on other sites

Thanks for the advice. I got it working. I think the bigger problem was the caching of the site icon in the browser and I thought it didn't work but when I went to a ipad I could see it and clearing the cache sorted it out but not on my main computer yet for some reason.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...