Last active
January 12, 2022 16:20
-
-
Save artikus11/34ac036b3ce0a1f54ae2ab9d876c5156 to your computer and use it in GitHub Desktop.
Перенаправление канонических ссылок страниц пагинации на основную страницу
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('wpseo_canonical', 'removeCanonicalArchivePagination'); | |
function removeCanonicalArchivePagination($link) { | |
$link = preg_replace('#\\??/page[\\/=]\\d+#', '', $link); | |
return $link; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment