diff --git a/htdocs/core/lib/website2.lib.php b/htdocs/core/lib/website2.lib.php
index 80d6d7a735d..c2260b72b9e 100644
--- a/htdocs/core/lib/website2.lib.php
+++ b/htdocs/core/lib/website2.lib.php
@@ -202,7 +202,7 @@ function dolSavePageContent($filetpl, Website $object, WebsitePage $objectpage,
$tplcontent .= ''."\n";
// Add favicon
- if ($objectpage->id == $object->fk_default_home) {
+ if (in_array($objectpage->type_container, array('page', 'blogpost'))) {
$tplcontent .= ''."\n";
}