favicon

Permalink
Instead of going into bookmark and pick up .ico file from file manager.... Are there any way I could override this by adding code into my custom theme? Such as this code perhaps?
<link rel="icon" href="<?=$view->getThemePath()?>/assets/ico/favicon.ico">

 
goodnightfirefly replied on at Permalink Reply
goodnightfirefly
Yep!

I personally keep it in the root directory as some web services will search for yoursite.com/favicon.ico, so I use:

<link rel="shortcut icon" href="<?php echo URL::to(""); ?>/favicon.ico">


All the other favicon-type files (windows-tile, apple-touch-icon etc), I keep in /application/files/favicons, for example:

<link rel="apple-touch-icon-precomposed" sizes="76x76" href="<?php echo URL::to(""); ?>/application/files/favicons/apple-touch-icon-76x76-precomposed.png">
APrather replied on at Permalink Reply
goodnightfirefly,

I've tried your method... Unfortunately, I am not seeing any of my favicon except for WAMP's favicon. (Perhaps WAMP override it??) I've confirmed favicon.ico is in the root folder of my custom theme. The code shows
<head>
    <?=Loader::element('header_required'); ?>
    <meta name="viewport" content="width=device-width, initial-scale=1">
   <link rel="showicon" href="<?php echo URL::to(""); ?>/favicon.ico">


Any solutions?
goodnightfirefly replied on at Permalink Reply
goodnightfirefly
Sorry for the confusion, if you want to have the favicon in your theme directory then you should use:

<link rel="icon" href="<?=$view->getThemePath()?>/favicon.ico">
APrather replied on at Permalink Reply
As much as I've tried. I am still not getting favicon.ico

<?php  defined('C5_EXECUTE') or die("Access Denied."); ?>
<!DOCTYPE html>
<html lang="<?php echo LANGUAGE ?>">
<head>
      <?=Loader::element('header_required'); ?>
     <meta name="viewport" content="width=device-width, initial-scale=1">
     <link rel="icon" type="image/x-icon" href="<?=$view->getThemePath()?>/favicon.ico" />
</head>


NOTE: favicon image size is 16x16 pixels
goodnightfirefly replied on at Permalink Reply
goodnightfirefly
Hmm, take a look at the Console (press F12) and see if there are any errors.

Is the site live somewhere we can take a look?

Also which version of Concrete5 are you using? Based on your first code snippet I presumed 5.7, but your other code snippets have 5.6 things (Loader::element, echo LANGUAGE etc).
APrather replied on at Permalink Reply
Finally! the favicon.ico showed up. Solved by changing theme then return back to problem one...I think it must be cache thing even if I had them turned off from dashboard > cache & speed settings.

goodnightfirefly, thank you for taking your time try to helping me out. truly appreciate it.
Scafidi454 replied on at Permalink Reply
Scafidi454
Having trouble getting the .ico or .png to load.

I uploaded the .ico and .png to my site/root dir, and then tried uploading it via concrete5 files, and using the path you provided as well as the direct path (https) to the file, neither work for me.

The site isn't live, but here's what I'm using now:

<your code>

-----

Modified

<!DOCTYPE html>
<link rel="shortcut icon" href="https://turnkeymsp.net/application/files/1114/7168/5182/favicon.png">

I am on my way to sleep. So, hope we can work on this in the morning.
Scafidi454 replied on at Permalink Reply
Scafidi454
Nevermind, I found it in the /updates/concrete5.7.5.8_remote_updater/concrete/themes/elemental/elements/header_top.php