Changing ordering of page title and site name in Joomla

It is good SEO practice to put the page title first in your title tags, and then your site name. Unfortunately, by default, Joomla places the site name first before the page title.

To change this, grab a copy of the file /includes/joomla.php

Around line number 507, replace this:

$this->_head['title'] = $title ? $GLOBALS['mosConfig_sitename'] . ' - '. $title : $GLOBALS['mosConfig_sitename'];

With this:

$this->_head['title'] = $title ? $title .' - '. $GLOBALS['mosConfig_sitename'] : $GLOBALS['mosConfig_sitename'];

37 thoughts on “Changing ordering of page title and site name in Joomla”

  1. Chette, thanks, thanks and thanks four your help… This topic (Changing ordering of page title and site name in Joomla) is just that I needed… You are a fantastic woman… Thanks…

  2. Wow, really great tip, I’m searching some solution for this for my joomla real estate and found this. Thanks for share.

  3. Thanks for the tip – it is real sad that one needs to hack the source code to get such a basic thing to work.

    I am writing an SEO article for Joomla and I will include this tip as well as a link back for the tip.

  4. Hi Chette, I just wanted to let you know that I did write the article and gave you kudos and linkhttp://www.wow-powerleveling-wow.com/

  5. Its great. But in joomla stable version, the path to be changed is in ‘\libraries\joomla\document\document.php’ in that we have a function called ‘setTitle($title)’. The title is actually rendered from there. So you can change title according to your wish

  6. thanks for sharing this joomla seo tips,Most cms’ title of joomla is not seo friendly ,like worddpress,hope you can write some thing for wordpress

  7. Its great. But in joomla stable version, the path to be changed is in ‘librariesjoomladocumentdocument.php’ in that we have a function called ‘setTitle($title)’. The title is actually rendered from there. So you can change title according to your wish [url=http://www.wow-powerleveling-wow.com/]wow gold[/url]

  8. hi all! great post but im having some issues, Im using stable version 1.0.13 and using sh404 for seo. The problem is when I edit the code as above I get an error like ”
    SH404SEF : headers were already sent when I got control!
    Killed at line 149 in sef404.php: HEADERS ALREADY SENT (200)
    URL=http://www.tsibatsiba.co.zaoption=com_frontpage&Itemid=42
    OPTION=com_frontpage ”

    any help would be greatly appreciated!

    thanks

    josh

  9. how can i do it in joomla 1.5.10.
    the path u’ve mentioned is available in joomla 1.0..
    here the path is /libraries/joomla/document/document.php
    but what i need to replace instead of line 545.
    function setTitle($title) {
    $this->title = $title;
    pls help.

  10. [url=http://www.uggboots100.co.uk/classic-tall-romantic-flower-ugg-boots.html]Classic Tall Romantic Flower Ugg Boots[/url]
    Allowing customers to post negative reviews gives credibility to the whole process

  11. Celtics give Rondo $55 million extension.The Boston Celtics and Rajon Rondo(notes) have reached an agreement in principle on a contract extension, Rondo’s agent, Bill Duffy, said [url=http://www.euwowgold.com]wow gold[/url] early Monday.League sources said the extension is for five years and guarantees Rondo at least $55 million.

  12. there is a missing step for this to work as well as the fletiring, if you are using the JCE editor (and who isn’t!) you also have to Check that the Editor Profile Parameters allow IFrames.In the JCE Control Panel, click on the Editor Profiles button.Click on the Profile name that the user, usergroup or component is assigned to, eg: Default’Click on the Plugin Parameters tab, then on the Media Support tab.Check that the Allow IFrames is set to Yes.

Leave a Reply to IRIS Cancel reply

Your email address will not be published. Required fields are marked *