SPECIAL OFFER: Only $69 for access to everything in OSTraining for 1 year! You save $75!  1
Join today and get access to 1,000's of books and videos. Learn WordPress, Drupal, Magento, Joomla and more! Sign up today!

Move the Title tag to the first position in head

6 years 11 months ago #101478 by johnniek2
I would like to move the Title tag to the first position in the head.
I know you guys will say it wont affect SEO, but I still want to test some things out as some SEO tools still notice if its not placed on the very beginning of the head section. I know its located in the head.php file inside:
\libraries\joomla\document\html\renderer.
but I have no success moving it that high? I really would like if you could give me some help how to move it above all other tags especially the <meta charset="utf-8"> tag

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<base href=" www.johnnie.hr/split-airport-transfers.html " />
<meta name="keywords" content="Split airport transfers, Split airport taxi, Split airport shuttle, Shuttle transfers Split, Split to Zadar" />
<meta name="author" content="Super User" />
<meta name="description" content="Book RELIABLE Split airport transfers before heading out to well-deserved vacation in Croatia. Split Airport taxi and shuttle service for Groups of All Sizes" />
<meta name="generator" content="Joomla! - Open Source Content Management" />
<title>Split airport transfers | Split airport taxi shuttle to Zadar</title>

Can you help with that?
Thanks in advance

Please Log in to join the conversation.

6 years 11 months ago - 6 years 11 months ago #101513 by Valentin
Hi johnniek2,

If I understood well your concern, you want to display <title> tag just after opening <head>, right?
Unfortunately this is not possible without trying to modify the core files (which is not recommended) or creating a custom plugin to do the jod.

Kind regards,
Valentín

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

6 years 11 months ago #101514 by johnniek2
Replied by johnniek2 on topic Move the Title tag to the first position in head
I know that, and I did it already (after updates it gets lost again) but now I didnt remember the steps, and know Iam not able to achieve it myself again (tried)... would you be able to give me a hand on this?

Please Log in to join the conversation.

6 years 11 months ago #101546 by Valentin
Hi johnniek2,

Sure thing. Try from the file \libraries\joomla\document\html\renderer line:110
That line seems to render the title tag. Move before to see if the order is affected.

Be aware this change should be made every time after you update Joomla.

Kind regards,
Valentín

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

6 years 11 months ago - 6 years 11 months ago #101550 by johnniek2
Replied by johnniek2 on topic Move the Title tag to the first position in head
I know that but I tried several positions where I placed it and it didnt work, can you give me hint to which line exactly?
see image


actually Iam able to move it to this position:
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Zadar Airport Transfers | Johnnie's airport taxi shuttle</title>

would like to place it like this:
<head>
  <title>Zadar Airport Transfers | Johnnie's airport taxi shuttle</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

This message has an attachment image.
Please log in or register to see it.

Please Log in to join the conversation.

6 years 11 months ago #101579 by Valentin
Move the line 110 to 73.
If <title> tag still is not listed first, edit your template file (generally is located in templates/yourtemplate/index.php) and move the tags listed before <jdoc:include type="head" />, as example the one related to viewport if is your case.
This last step depends on the template you are using.

Kind regards,
Valentín

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

Join today and get access to 1,000's of books and videos. Learn WordPress, Drupal, Magento, Joomla and more! Sign up today!