Skip to main content

Home Tag Removal - Joomla Homepage Title

In the top of the home page in Joomla installation it reads the title of the page followed by Home. It is even picked by google and I often wondered why that tag is there from user's perspective. If you also have Joomla installation and want to remove it here is what you can do.

In Joomla installation directory, go to folder includes and locate joomla.php .

Search for setPageTitle. It is somewhere near the top 20% of the file.

Comment out the following lines:

function setPageTitle( $title=null ) {
if (@$GLOBALS['mosConfig_pagetitles']) {
$title = trim( htmlspecialchars( $title ) );
$title = stripslashes($title);
$this->_head['title'] = $title ? $GLOBALS['mosConfig_sitename'] . ' - '. $title : $GLOBALS['mosConfig_sitename'];
}
}

Add the following lines just after:

function setPageTitle( $title=null ) {
if (@$GLOBALS['mosConfig_pagetitles']) {
$title = trim( htmlspecialchars( $title ) );
$title = stripslashes($title);
if ($title == 'Home') {
$this->_head['title'] =
$GLOBALS['mosConfig_sitename'];
}
else { $this->_head['title'] = $title ?
$GLOBALS['mosConfig_sitename'] . ' - '.
$title : $GLOBALS['mosConfig_sitename'];
}
}
}