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: http://core.svn.wordpress.org/trunk@21571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Peter Westwood 2012-08-21 12:53:54 +00:00
parent a8ce9af6d8
commit 791eda2594

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";
}