Přidání rel=“next” & rel=“prev” do hlavičky pro stránkované archivy
Adding rel=“next” & rel=“prev” for paginated archives, put this code into functions.php
function rel_next_prev(){
global $paged;
if ( get_previous_posts_link() ) { ?>
<link rel="prev" href="<?php echo get_pagenum_link( $paged - 1 ); ?>" /><?php
}
if ( get_next_posts_link() ) { ?>
<link rel="next" href="<?php echo get_pagenum_link( $paged +1 ); ?>" /><?php
}
}
add_action( 'wp_head', 'rel_next_prev' );
Can be done also by Yoast's WordPress SEO plugin or by Pagination Rel Links plugin.