When comment paging is enabled make sure to have canonical links for each of the comment pages so that all the comments are indexed instead of just the ones that are displayed on the permalink itself.

Fixes #21579 props jkudish.


git-svn-id: https://develop.svn.wordpress.org/trunk@21571 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2012-08-21 12:53:54 +00:00
parent 2f0f6ae73e
commit 4803997d35
1 changed files with 4 additions and 0 deletions

View File

@ -2338,6 +2338,10 @@ function rel_canonical() {
return;
$link = get_permalink( $id );
if ( $page = get_query_var('cpage') )
$link = get_comments_pagenum_link( $page );
echo "<link rel='canonical' href='$link' />\n";
}