mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-28 15:17:42 +02: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: http://core.svn.wordpress.org/trunk@21571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a8ce9af6d8
commit
791eda2594
@ -2338,6 +2338,10 @@ function rel_canonical() {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
$link = get_permalink( $id );
|
$link = get_permalink( $id );
|
||||||
|
|
||||||
|
if ( $page = get_query_var('cpage') )
|
||||||
|
$link = get_comments_pagenum_link( $page );
|
||||||
|
|
||||||
echo "<link rel='canonical' href='$link' />\n";
|
echo "<link rel='canonical' href='$link' />\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user