This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Pagination with rel=“next” and rel=“prev” in HEAD.
#1

Google is recommending usage of rel=“next” and rel=“prev” in HEAD, see:

http://googlewebmastercentral.blogspot.c...lprev.html

I've implemented this functionality on pages, using Commentics, with small script. Result looks like (in HEAD section):

( I'm also adding rel="canonical" to the first and the last page in pagination to exclude duplicates like:
1) first page without ?p=1 parameter, called directly
2) last page, called with ?p=value greater then it is. )

<head>
...
<link rel="canonical" href="http://xxxxx/yyyyyyy.php?p=1" />
<link rel="next" href="/yyyyyyy..php?p=2" />
...
</head>


Script is called in HEAD:

<head>
...
<?php
$ppage_id = "1";
define ('IN_COMMENTICS', 'true');

$glava_rel="vseb/glava-rel.php" ;
include $glava_rel ;
?>
...
</head>nextnextnextnext


Attached Files
.php glava-xxx.php Size: 5.13 KB  Downloads: 30
Reply
#2

Bugs corrected, second version.


Attached Files
.php glava-xxx.php Size: 5.17 KB  Downloads: 56
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post

Forum Jump:


Users browsing this thread: 1 Guest(s)