Changing Homepage Title From "Name" | "Slogan" to...

hitboy - February 23, 2008 - 08:22

Hello I am trying to figure out how to change my homepage title from "sitename" | "slogan" to "slogan" | "name".

I noticed that every other page it has the "page title" | "sitename" except on the homepage it does it reversed..

Can anyone tell how to change the settings for the home page only or what files I would be able to edit thanks!

Depends

CrookedNumber - February 23, 2008 - 20:08

If you want to change just the homepage, I'd suggest doing it at the theme level.

In page.tpl.php (assuming that you're using a PHPtemplate theme and in Drupal 5), look for this line

<title><?php print $head_title ?></title>

And change it to something like:

<title><?php if ($is_front) {print $site_slogan . ' | ' . $site_name;} else print $head_title ?></title>

If you want seriously granular control over the 's of your site, try this module: http://drupal.org/project/page_title

I tried what you said but it

hitboy - February 24, 2008 - 18:24

I tried what you said but it didnt seem to work but it didnt mess anything up either..

Webmaster Blog -Internet Marketing & Seo Information

Hmmm...

CrookedNumber - February 24, 2008 - 19:56

I'd first try refreshing several times -- just to make sure that you not looking at a cached version.

Then -- ON A TEST SITE -- try something like:

<title><?php if ($is_front) {print "you are on the homepage";} else print "Not on the homepage" ?></title>

to start the de-bugging.

p.s. -- I just tried the above code on a test site. And it worked fine.

Themes configuration

spinjam - March 25, 2008 - 16:38

Have you enabled the slogan display in the Themes -> Config?

 
 

Drupal is a registered trademark of Dries Buytaert.