Topic Closed
14 Posts


thank you so much for GPeasy! It´s great, pretty and so easy (GPeasy)! I  love it.

I´ve made a site which is running superb. But I´ve got one question:

How can I use a Favicon? I know that there was a answer in this form, but ... well... I dont know which file I should edit?

I´ve got the favicon.ico file in the root. And I use the Light_Texture/Blue Theme. Mmmh... but I dont want to "mess around"... so...

Please, could you help me?



9 years ago#2755

Josh S.
2K Posts
16 Themes
18 Plugins

I would edit your theme's template.php file. These are located in the folders /themes/--theme-name--/template.php.

The template.php files are mostly html files with a few php calls interspersed so if you're familiar with html, it should be pretty straight forward. Just add the favicon html in between the <head> tags.




<link href="" rel="icon" type="image/png" />



Note: If you are using a theme that is bundled with gpEasy by default. It would be best ot copy the theme and edit the copied theme instead of using the default theme. Upgrading gpEasy overwrites the default themes including any of the changes you make to them.

9 years ago#2757

3 Posts

I am creating my own theme and now i will add a favicon.

In the file-structure it ist under:" themes \ my_theme \ images \ favicon.png"

The Link in the head-tags is this: " <link rel="icon" type="image/png" href="images / favicon.png" /> "

But it wont work. What i am doing wrong?

Edited: 8 years ago#4392

264 Posts

The favicon has to be in your webroot, like Can't find a reference of this, but i'm pretty sure it has to be.

8 years ago#4393

3 Posts

Thanks for your reply.

You are right jogai, the image file has to be in the root dirctory.


The code for the template.php head is this: " <link rel="icon" type="image/png" href="../../favicon.png" /> ".




8 years ago#4400

1.5K Posts
16 Plugins
design, web development & visual effects

Browsers will automatically look for a favicon.ico in the server root directory. But thats not always feasible, for instance if you host your CMS site for testing purposes in a subdirectory. If you want to tie your favicon.png to the gp|Easy theme you could use this code in the template.php:

<link rel="shortcut icon" type="image/png" href="<?php global $dirPrefix, $page; echo 'http://'.$_SERVER['SERVER_NAME'].$dirPrefix.'/themes/'.$page->theme_name; ?>/favicon.png" />

/edit: If you want this even to work in a secure server environment (https://), use this:

<link rel="shortcut icon" type="image/png" href="<?php global $dirPrefix, $page; echo ($_SERVER['SERVER_PORT'] != 443 ? 'http://' : 'https://').$_SERVER['SERVER_NAME'].$dirPrefix.'/themes/'.$page->theme_name; ?>/favicon.png" />

Edited: 8 years ago#4414

Josh S.
2K Posts
16 Themes
18 Plugins

You could also use $page->theme_path


global $page;

echo '<link rel="shortcut icon" type="image/png" href="'.dirname($page->theme_path).'/favicon.png" />';

8 years ago#4430

Topic Closed



elFinder 2.1.50 in Upcoming Release

A new release for Typesetter is in the works with a lot of improvements including the ... Read More

Typesetter 5.1

Typesetter 5.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

More News


Company located in T├│rshavn, Faroe Islands. * Webpage Design * Consultant & Provider of a wide range of programs for visually impaired and dyslextics.

Find out more about our Provider Spotlight

Log In