Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
1.1k views
in Themes by

Hi,

 

i have placed a function  in <b>qa-theme.php</b>

function

 function favicon()
{
qa_html_theme_base::favicon();
$this->output('<link rel="shortcut icon" href="'.$this->rooturl.'favicon/fav.ico" type="image/ico">');
$this->output('<link rel="shortcut icon" type="image/ico" href="favicon/frav.ico" />');
}

But favicon is not showing in title bar. What will be the problem?

Q2A version: 1.6.2

1 Answer

+1 vote
by

I show two methods. Even if favicon file is not site root, both are OK.

Method1

This is most simple way.

  1. Upload your favicon.ico to your site root
  2. "Admin" > "Layout"
  3. Input code below to "Custom HTML in <head> section of every page"

<link rel="shortcut icon" href="(root url)favicon.ico">

Method2

If you change your qa-theme.php, it is necessary to add HTML tag to existing function.

function head_custom()
{
  // abstract method
  $this->output('<link rel="shortcut icon" href="(root url)favicon.ico">');  // <= Add this
}
Good luck!
...