0
Welcome Guest! Login
0 items Join Now

SOLVED Change order of title, content and keywords?

  • SOLVED Change order of title, content and keywords?

    Posted 15 years 4 months ago
    • Hi,

      I'm using the Hivemind template on http://www.nyenegle.dk and the site title is right now below the "meta-stuff". I think that moving the title of the page above the meta description etc. would improve Google ranking a little bit, so I went looking for the place to change the order. But I'm not able to locate the file, that makes the title and the "meta-stuff". I looked in rt_head_includes.php as this sounded abvious to me, but the lines are loaded before rt_head_includes.php

      Can anyone tell me where to look?

      Thanks in advance.

      Best regards,

      Thomas Petersen, Denmark
    • Last Edit: 15 years 4 months ago by Thomas Petersen.
  • Re: SOLVED Change order of title, content and keywords?

    Posted 15 years 4 months ago
    • Open this file:
      <Joomla Root>/libraries/joomla/document/html/renderer/head.php

      Find below codes:
      // Generate META tags (needs to happen as early as possible in the head)
      foreach ($document->_metaTags as $type => $tag)
      {
           foreach ($tag as $name => $content)
           {
                if ($type == 'http-equiv') {
                     $strHtml .= $tab.'<meta http-equiv="'.$name.'" content="'.$content.'"'.$tagEnd.$lnEnd;
                } elseif ($type == 'standard') {
                     $strHtml .= $tab.'<meta name="'.$name.'" content="'.str_replace('"',"'",$content).'"'.$tagEnd.$lnEnd;
                }
           }
      }
       
      $strHtml .= $tab.'<meta name="description" content="'.$document->getDescription().'" />'.$lnEnd;
      $strHtml .= $tab.'<meta name="generator" content="'.$document->getGenerator().'" />'.$lnEnd;
       
      $strHtml .= $tab.'<title>'.htmlspecialchars($document->getTitle()).'</title>'.$lnEnd;

      Change the codes to:
      // Generate META tags (needs to happen as early as possible in the head)
      $strHtml .= $tab.'<title>'.htmlspecialchars($document->getTitle()).'</title>'.$lnEnd;
      foreach ($document->_metaTags as $type => $tag)
      {
           foreach ($tag as $name => $content)
           {
                if ($type == 'http-equiv') {
                     $strHtml .= $tab.'<meta http-equiv="'.$name.'" content="'.$content.'"'.$tagEnd.$lnEnd;
                } elseif ($type == 'standard') {
                     $strHtml .= $tab.'<meta name="'.$name.'" content="'.str_replace('"',"'",$content).'"'.$tagEnd.$lnEnd;
                }
           }
      }
       
      $strHtml .= $tab.'<meta name="description" content="'.$document->getDescription().'" />'.$lnEnd;
      $strHtml .= $tab.'<meta name="generator" content="'.$document->getGenerator().'" />'.$lnEnd;
  • Re: SOLVED Change order of title, content and keywords?

    Posted 15 years 4 months ago
    • Thanks - that was exactly what I was looking for.

      Best regards,

      Thomas Petersen, Denmark
    • MobileMaster's Avatar
    • MobileMaster
    • Sr. Rocketeer
    • Posts: 192
    • Thanks: 0
    • Web Developer

    Re: SOLVED Change order of title, content and keywords?

    Posted 14 years 11 months ago
    • Thanks for this thread!

Time to create page: 0.068 seconds