By mjross on
If you create a custom theme, and its recipient installs it within a Drupal site and sets it as the default theme, the site's favicon is apparently still the file misc/favicon.ico -- even if there is a favicon.ico file located in theme X's root directory (e.g., sites/all/themes/X). The user can choose your theme's favicon.ico, by going to the theme's configuration page and setting the shortcut icon. But this is a manual process.
Is there a way to modify a theme, before shipping it to a user, so the theme's own favicon is specified and becomes the site's favicon, as soon as the theme is set as the default, without additional work by the user?
Comments
No one has any suggestions?
No one has any suggestions?
maybe not too helpful
but I thought I had the same question as you.
Turns out that a subtheme doesn't necessarily inherit the favicon of its parent theme. I had actually setup the favicon correctly in my Zen subtheme, merely by putting the favicon.ico in the root directory of that theme. It seems that drupal looks for a favicon.ico in the current theme's root, and if it doesn't find it then it outputs:
<link rel="shortcut icon" href="/misc/favicon.ico" type="image/x-icon" />but merely putting the favicon.ico file in the theme root, and touching no theme files or settings in the admin interface, led drupal to output:
<link rel="shortcut icon" href="/sites/all/themes/mytheme/favicon.ico" type="image/x-icon" />I kept thinking that it wasn't working, but I have a subtheme of Zen, and then subthemes of that. The sub-subthemes didn't inherit the favicon, I had to manually place it in each of their theme roots.
@mjross, I hope I have helped you at all, although I probably haven't. I just thought I should put this online so that others won't waste hours on such a trivial thing, as I did.
-
Off hand, I would believe that this is an issue with your custom theme. Any favicon placed inside your theme root should override the Drupal favicon.
As a note, maybe try clearing browser cache. Maybe it is working, but your browser is just not showing it.
----
Sudo Kill Cylons
name it favicon.ico
Indeed. Place the image at the root of your subtheme. It must be named favicon.ico to automatically override.
--
David Needham
Simillar thing I have percieved with favicon in Drupal's root
Try to delete or change Drupal's root directory favicon located in first level of Drupal directory. Change it there.