MODX Community

Anyone wanna help me how do I put favicon on my website?

I was using Wordpress for 6y+ and now I even cannot are favicon to the site. I don’t even know how to get to html site root files. I added favicon code to the and I simply cannot find anything. Any help pls.

1 Like

Hey and welcome to the Community!

In the Manager on the left side you’ll see a “Files” tab. Through there you are able to see all the files on the root level.

I assume that you have some sort of file management or FTP access to your site as well? You should also be able to add your favicon.ico file to the root via one of those, too.

For better support and to serve a variety of browser or apps you can also use a favicon generator. Just take a quick search for that, there are dozens out there. Most of them come with their own code examples as well which you want to copy to the <head> section of your resources.

There’s also plenty of tutorials out there to help you.

1 Like

@raoulalien, welcome!

It’s going to be hard for us to breakdown a site we have never seen before, but if you are having trouble finding the HTML, maybe this will help:

Templates are a good starting point:

  • At the top left of your MODX website, select the “Elements” tab
  • Look for the “Templates” header in the list

In the template you will notice little variables like: [[$head]], [[+meganav]]…These can be named anything, but the [square brackets] make them stand out.

Example:

<!DOCTYPE html>
<html lang="en">
[[$head]]

In the example above, all the <head> HTML is in a “Chunk”, let’s find the Chunks:

  • In the “Elements” tab, look for a “Chunks” header
  • Match the chunk name found in your Template, to the name of one of the chunks found in that list
  • Open the Chunk by selecting it, add the following HTML for an icon: <link href="favicon.ico" rel="shortcut icon" type="image/x-icon" /> in the appropriate place
  • The “Save” button is located in the top right

Next we need to upload the icon. Again, your file structure is impossible for us to understand without seeing it, but maybe this will help guide you:

  • Back to the tabs at the top, navigate to the “Files” tab
  • Look for the “Filesystem” header
  • Navigate to your root, and right click
  • Select “Upload Files”

I really enjoyed this video series, it’s a bit outdated, but it gets you heading in the right direction.

1 Like