mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
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:
@@ -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";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user