Home page rel canonical for Semplicity

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Tue Sep 24, 2013 5:07 pm
Reply with quote
Report this post
Hi I bought Simplicity and I downloaded it for Joomla 3.
I really don't understand in which file and how to use rel=canonical
Whe I share my website in Facebook I see http://www.smywebsite.com/?view=featured and I read what Dziudek has written in july '13 for "The World News II" template: "You can modify the head section in the layouts/default.php file or in the layouts/blocks/head.php file." https://www.gavick.com/forums/the-world ... 27389.html

But it doesn't work or they're not the same files in Simplicity
<?php $app = JFactory::getApplication();
$menu = $app->getMenu();
if ($menu->getActive() == $menu->getDefault()) { ?>
<link rel="canonical" href="http://www.mywebsite.com" />
<?php } ?>


Could you please help me? Which files am I supposed to consider? And how ?

Thank you very much,
Lorenzo
User avatar
Fresh Boarder

GK User
Tue Sep 24, 2013 9:39 pm
Reply with quote
Report this post
Did you modify head area ? You need to add rel="canonical" in head part my code :

Code: Select all
<link rel="canonical" href="http://www.mywebsite.com" />
in layouts/blocks/head.php where you can find HEAD tag.
User avatar
Platinum Boarder

GK User
Wed Sep 25, 2013 8:57 pm
Reply with quote
Report this post
Thank you Bkrztuk,
but actually I cannot find HEAD tag in layouts/blocks/head.php.
In that file I can read instead:

<?php
// This is the code which will be placed in the head section

But there is not HEAD tag.
And if I put the code you told me, I get an error message.
Please, have you got another solution?

Thank you,
Lorenzo
User avatar
Fresh Boarder

GK User
Fri Sep 27, 2013 11:25 am
Reply with quote
Report this post
That is the part visible at the head area, HEAD tag is in file layouts/default.php file.
User avatar
Platinum Boarder

GK User
Mon Sep 30, 2013 9:49 am
Reply with quote
Report this post
Hi Bkrztuk,
I put the code in that file, but it doensn't work. Somenone else wrote had the same problem as me.

What could we do? It's important to sort it out.
Thank you
User avatar
Fresh Boarder

GK User
Thu Oct 03, 2013 9:10 am
Reply with quote
Report this post
Could you give me your website URL ? I'll check whether the code is visible is source code properly.
User avatar
Platinum Boarder

GK User
Mon Oct 07, 2013 3:10 pm
Reply with quote
Report this post
Hi Brztuk,
I sent it to you in private message.

Thank you
User avatar
Fresh Boarder

GK User
Wed Oct 09, 2013 10:31 am
Reply with quote
Report this post
Did you get my response ? If you want to hide ?view=featured part you need to set canonical URL to root of your site - http://www.smywebsite.com
User avatar
Platinum Boarder

GK User
Thu Oct 10, 2013 8:21 am
Reply with quote
Report this post
Hi Bkrztuk,
I did it. As you wrote I inserted
<link rel="canonical" href="http://www.mywebsite.com" />
where I could find HEAD tag in layouts/default.php file.

But I still can read in the code:
<link href="http://www.mywebsite.com/?view=featured" rel="canonical" />

I wrote a private message with more details.
User avatar
Fresh Boarder


cron