Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I want to remove the browser page title which appears on the browser like:

Example Name site - Home.

and be like:

Example Name Site

I know the "Browser Page Title" under "Page Display Options", but if I leave it empty, it uses the Menu Item Title..

I want this omission of browser page title only for the home page.

EDIT: To state it again and clear: What I want is that my 'Browser Title' should be blank and NOT pick up a title from the "Menu Title".

Important: The solution should be working for bilingual (or multilingual) websites, that means "My Website - Home" will be "My Website" and other languages will follow the same rule, i.e. "Mon Website - Accueil" will be "Mon Website".

ps. I'd like a solution for Joomla 2.5 but it would be nice if users with other versions could be helped as well.

share|improve this question
add comment

7 Answers

The only solution I found until now (Joomla 3.0) is adding the following snippet in your template's index.php file before <jdoc:include type="head" />.

The snippet for my page looks like this:

<?php
if (!strncmp($this->getTitle(), "Home", 4))
{
  $app = JFactory::getApplication();
  $this->setTitle( $app->getCfg( 'sitename' ) );  
}
?>

This basically is a hack that replaces the title if it begins with "Home".

share|improve this answer
    
What about Joomla 2.5.8?... –  Yannis Dran Jan 25 '13 at 17:11
    
Doesn't work for earlier version of Joomla :/ –  Yannis Dran Mar 10 '13 at 17:54
add comment

Go to your Joomla! 2.5 backend --> Menu Manager --> Main Menu. Click on Home and take note of the menu item id. In this example, it's 101.

Add the following code to your template's index.php file, before <jdoc:include type="head" />

<?php
  $menuItemId = JRequest::getInt('Itemid');
  if ($menuItemId == 101) $this->setTitle('');
?>

If you want a custom title, e.g. My Custom Title, use $this->setTitle('My Custom Title');

Haven't tested this on a multilingual website, but assuming each language has its own home page, you would just test for all home pages, using their unique menu item ids.

share|improve this answer
    
Thanks for replying, I m gonna try it. Is this gonna change the way Google shows the title of my website too? –  Yannis Dran Dec 9 '13 at 19:24
    
It works for a monolingual website. Even though doesn't replies exactly what my question stated, helped me to find the the right answer for the bilingual website. –  Yannis Dran Jan 29 at 19:18
add comment

I strongly recommend installing AceSEF or SH404SEF within Joomla. AceSEF is free and does the job while SH404SEF tends to have slightly more features but comes a price. Joomla SEO is ok out of the box but its far from perfect, altering templates is ok but using an extension is far easier and does more SEO than just what you asked.

share|improve this answer
add comment
    <?php
        $title = $this->getTitle();
        $app = JFactory::getApplication();
        //$this->setTitle( $title . ' - ' . $app->getCfg( 'sitename' ) );
        $this->setTitle( 'your funky title' );
    ?>

It is all in here

Try adding if(str_pos($this->getTitle(), "Part of your home page title")!=false)

share|improve this answer
    
I have the feeling that you didn't read or understand my question.. –  Yannis Dran Mar 10 '13 at 17:48
    
system didn't let edit my commend so I continue here: I especially wrote: 'I want this omission of browser page title only for the home page.' Your solution only partially works.. Thanks anyway. –  Yannis Dran Mar 10 '13 at 17:58
add comment
up vote 1 down vote accepted

As George Okello said, you have to notice the First page's Id. Go to Menu Manager and find them out for each language. There must be a different configuration if you have a plugin for multilingual websites.

in my case both ids were 127 and 128. So the solution is to put the following code before the <jdoc:include type="head" />.

<?php
  $menuItemId = JRequest::getInt('Itemid');
  if ($menuItemId == 127) : $this->setTitle('Theater of the Deaf of Greece');
  elseif ($menuItemId == 128) : $this->setTitle('Θέατρο Κωφών Ελλάδος');
  endif;
?>

Now if you have a multilingual website, all you have to do is to copy the line elseif ($menuItemId == xx ) : $this->setTitle('xxxx'); and paste it before the endif; for as many languages (or pages with unique id's) you wish.

share|improve this answer
add comment

Make sure "Show Page Heading" is set to No under Page Display Options for the Home menu item. That will hide the title as long as you have also set "Show Title" to Hide under Article options of the same menu item.

share|improve this answer
1  
Does not work for me.. my home page is a "category blog" and even if I additionally set "Category Title" to Hide under "Category Options" the page still says "Home - ..." –  Tarnschaf Dec 12 '12 at 16:58
    
@Trev yeaaah, Tarnschaf is right.. If i put show page heading to no, then it removes my h1 tag I have set with the entry "Page Heading" into the page. What I need is that my 'Browser title is set to blank and later it won't pick a title from my 'Menu title'.. –  Yannis Dran Jan 25 '13 at 17:08
add comment

Title Manager can do that: http://extensions.joomla.org/extensions/site-management/seo-a-metadata/title-management/3521 Only show site name on home page: Yes

share|improve this answer
    
Thanks for informing me about it. Does this affects also how Google shows the website title? –  Yannis Dran Dec 9 '13 at 19:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.