Wordpress rel=prev / rel=next

I have noticed on my clients wordpress websites, that wordpress as core code is using rel='prev' and rel='next' on real pages, not just paginated pages.

The clients website was not ranking so well and I have wondered whether this was one of the causes?

Google setup the functionality specifically for pagination - the idea was that page 2, 3, 4 etc could have combined power into page one very similar to how rel='canonical' is used.

If the code is then used on real pages - like I found it used on the HOME page of my clients site, with the prev page being noted as another page, then rankings are likely to be severely messed up.

per stackexchange

The following can be added to your wordpress theme functions.php file.
// to remove the core wordpress rel=prev / rel=next code
remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );

// to add the rel=prev/next for the paginated pages
add_action( 'wp_head', 'cor_rel_next_prev_pagination' );
* Pagination with rel="next" and rel="prev".
* @link wp-includes|default-filters.php
* @link http://core.trac.wordpress.org/ticket/18672 Implement rel="prev" and rel="next" for archives
* @link http://googlewebmastercentral.blogspot.com/2011/09/pagination-with-relnext-and-relprev.html Pagination with rel="next" and rel="prev"
function cor_rel_next_prev_pagination() {
global $paged;
if ( get_previous_posts_link() ) {
<link rel="prev" href="<?php echo get_pagenum_link( $paged - 1 ); ?>">
if ( get_next_posts_link() ) {
<link rel="next" href="<?php echo get_pagenum_link( $paged + 1 ); ?>">

Subscribe to be notified of new posts

Enter your email address:

Delivered by FeedBurner