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:
parent
2f0f6ae73e
commit
4803997d35
@ -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";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user