Forum
Blog listings - add page numbers to title tag
Hi,
For the purposes of SEO so that duplicate page titles are not flagged for page, category, tag and archive listings with pagination how can I put the current page number into the <title> tag?
Here is my current global.header layout I am using across the site
<?php
if (perch_layout_has('blog-post')) {
perch_blog_post_meta(perch_get('s'));
}
elseif (perch_get('cat')) { echo '<title>';
perch_blog_category(perch_get('cat'));
echo ' </title>';
}
elseif (perch_get('tag')) { echo '<title>';
perch_blog_tag(perch_get('tag'));
echo '</title>';
}
else{
echo '<title>' . perch_pages_title(true) . '</title>';
perch_page_attributes(array(
'template' => 'seo.html'
));
}
?>
Use: