MyBB Community Forums

Full Version: favicon.ico only shows in default theme
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a favicon.ico image in my root directory of the site. This shows as the tab icon. But if you switch it to a different theme, it shows a different icon in the tab.

There is an option to change the logo image for the theme, but there is no option to change the favicon...nor would i want to. Why is this changing and how can i change it back for that theme?

I tried adding this to the new theme header template
<link rel="icon" href="http://www.python-forum.io/favicon.ico" />

but it didnt do anything.
(2016-10-11, 05:45 PM)metulburr Wrote: [ -> ]I have a favicon.ico image in my root directory of the site. This shows as the tab icon. But if you switch it to a different theme, it shows a different icon in the tab.

There is an option to change the logo image for the theme, but there is no option to change the favicon...nor would i want to. Why is this changing and how can i change it back for that theme?

I tried adding this to the new theme header template
<link rel="icon" href="http://www.python-forum.io/favicon.ico" />

but it didnt do anything.

Try removing this in the specific theme: 
https://community.mybb.com/thread-163929...pid1217032

Or just add your favicon.ico to the theme that has theme specific favicon overwriting the existing ico in the theme specific directory.
Could you update headerinclude file?
I cannot... there is some db problem.
(2016-04-12, 04:09 AM)vintagedaddyo Wrote: [ -> ]
(2016-04-05, 11:45 AM)Misinformed Wrote: [ -> ]This fixed my issue.  Thanks.



If you want theme specific favicon usage rather than using only one specific favicon in the main directory for every theme:

Upload your specific favicon.ico to each of your themes directories:

In your themes "ungrouped templates"  find the following in the "headerinclude" template of each theme:
{$stylesheets}

Add the following above it:

<!-- Add Theme Specific Favicon -->
<link rel="Shortcut icon" href="{$theme['imgdir']}/favicon.ico" />
I tried this method. IT swtiched for a split second but then switched back to the original...and now stays the original?
(2016-10-15, 12:41 PM)metulburr Wrote: [ -> ]
(2016-04-12, 04:09 AM)vintagedaddyo Wrote: [ -> ]
(2016-04-05, 11:45 AM)Misinformed Wrote: [ -> ]This fixed my issue.  Thanks.



If you want theme specific favicon usage rather than using only one specific favicon in the main directory for every theme:

Upload your specific favicon.ico to each of your themes directories:

In your themes "ungrouped templates"  find the following in the "headerinclude" template of each theme:
{$stylesheets}

Add the following above it:

<!-- Add Theme Specific Favicon -->
<link rel="Shortcut icon" href="{$theme['imgdir']}/favicon.ico" />
I tried this method. IT swtiched for a split second but then switched back to the original...and now stays the original?

Five possible locations for favicon.ico: website root or website images directories, forum root directory, forum image directory, forum theme directory..., etc. By default some browsers without you defining favicon will search and find a favicon in any directory and attempt to display it in btowder tab, hence why people often try to physically define the favicon to be called. Some people call a generalized favicon for all themes pulling one favicon only from the main mybb root directory like so:
<link rel="Shortcut icon" href="{$mybb->settings['bburl']}/favicon.ico" /> 
 * that would give one favicon no matter the theme.

Or for one favicon no matter the theme but pulling the ico from images directory rather than root directory
<link rel="Shortcut icon" href="{$mybb->settings['bburl']}/images/favicon.ico" />
* that would give one favicon no matter the theme.


Or like many prefer to have individual theme specific usage:

For example:
<!-- Add Theme Specific Favicon -->
<link rel="Shortcut icon" href="{$theme['imgdir']}/favicon.ico" />
 or another example:

<!-- Add Theme Specific Favicon -->
<link rel="Shortcut icon" href="{$theme['imgdir']}/themes/theme-name-folder/favicon.ico" />

OR:
<!-- Add Theme Specific Favicon -->
<link rel="Shortcut icon" href="{$mybb->settings['bburl']}/images/theme-name-folder/favicon.ico" />

OR:
<!-- Add Theme Specific Favicon -->
<link rel="Shortcut icon" href="{$mybb->settings['bburl']}/themes/theme-name-folder/favicon.ico" />


* that would give you individual favicons per theme selected


Look for any of them and edit or remove to your likings.

* also note that some browsers and software scan specific directories for a favicon.ico present and use whatever one is found often when one is not defined
Go in your header include template and you can place your favicon tag there.
These days you really don't even need the tag, browsers will try and request the file without having to be told where it is, considering it is almost always called favicon.ico and stored in the webroot. Put it there and the browser will pick it up.
(2016-10-19, 06:05 PM)Matt Wrote: [ -> ]These days you really don't even need the tag, browsers will try and request the file without having to be told where it is, considering it is almost always called favicon.ico and stored in the webroot. Put it there and the browser will pick it up.

It is in the webroot. And it is called favicon.ico

metulburr / var/www/python-forum.io $ ls | grep .ico
favicon.ico
Then browsers will pick it up sooner or later Smile
Quote:Then browsers will pick it up sooner or later [Image: smile.gif]
Oh i guess i was assuming it would happen at that time. Its working now a few days later