COMMUNITY FORUM
Title Tag and Meta Description in Header
- Michael Züst
-
Topic Author
- Offline
- New Member
Less
More
11 years 8 months ago #116085
by Michael Züst
Title Tag and Meta Description in Header was created by Michael Züst
Dear Community
My Website has several Categories with lots of articles. Every category has it's unique meta description and title. But if Pagination is activated and there are like 10 pages in 1 category with let's say 15 Items per Page, the Category title and meta description stays always the same. This is a problem in SEO Aspects, so that Google Webmaster Tools tells me, that I have duplicate title and meta description on my page. I am already using rel prev and rel next, but this doesn't help with this issue. Is there a possibility to add with php automatically the page-number for each page to avoid duplicate titles and metas? Would be great if someone could tell me, where and maybe how i could solve this problem.
Sincerly
Michael
My Website has several Categories with lots of articles. Every category has it's unique meta description and title. But if Pagination is activated and there are like 10 pages in 1 category with let's say 15 Items per Page, the Category title and meta description stays always the same. This is a problem in SEO Aspects, so that Google Webmaster Tools tells me, that I have duplicate title and meta description on my page. I am already using rel prev and rel next, but this doesn't help with this issue. Is there a possibility to add with php automatically the page-number for each page to avoid duplicate titles and metas? Would be great if someone could tell me, where and maybe how i could solve this problem.
Sincerly
Michael
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
11 years 8 months ago #116086
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Re: Title Tag and Meta Description in Header
Hello Michael
You can use the $paged variable to add metatags
To add the metatags you want you can use Joomla!'s setMetadata Fuction
docs.joomla.org/JDocument/setMetaData
You can use the $paged variable to add metatags
if($paged)
To add the metatags you want you can use Joomla!'s setMetadata Fuction
docs.joomla.org/JDocument/setMetaData
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Michael Züst
-
Topic Author
- Offline
- New Member
11 years 8 months ago #116087
by Michael Züst
Replied by Michael Züst on topic Re: Title Tag and Meta Description in Header
Hi Krikor, Thank you for the hint with meta tags. The Meta and title thing is clear now... But I don't get it how to use $paged with an if function. Could you give me an example?
I tried a lot of different ways, but none of them seems to work. something like;
<?php if($paged < 2): ?>
<?php echo xxx ?>
<?php endif; ?>
or simply if($paged) echo xy, but this does not work at all.
I also thought of using this string:
$this->pagination->getPagesCounter()
But this gives me an error if i try to use this with an if function.
Thank you anyway for your Help!
Michael
I tried a lot of different ways, but none of them seems to work. something like;
<?php if($paged < 2): ?>
<?php echo xxx ?>
<?php endif; ?>
or simply if($paged) echo xy, but this does not work at all.
I also thought of using this string:
$this->pagination->getPagesCounter()
But this gives me an error if i try to use this with an if function.
Thank you anyway for your Help!
Michael
Please Log in or Create an account to join the conversation.
- Michael Züst
-
Topic Author
- Offline
- New Member
11 years 8 months ago #116088
by Michael Züst
Replied by Michael Züst on topic Re: Title Tag and Meta Description in Header
I've found another solution:
Because i didn't get it worked with $paged, i used instead this code:
Because i didn't get it worked with $paged, i used instead this code:
Log in or Create an account to join the conversation.