Disable rel=”author” for pages in WordPress

Joost de Valk updated his very popular WordPress SEO plugin recently. With the updated came a welcome addition, the ability to put a link rel=”author” meta tag in your header.
In many cases you will want this on your blog posts, but not on your static pages. Just drop the following snippet into your functions.php file to remove the link tag for all WordPress pages.

// Disable author links for pages
function wpseo_disable_page_author_link( $link ) {
    if ( is_page() ) {
        return false;
    }
    return $link;
}
add_filter( 'wpseo_author_link', 'wpseo_disable_page_author_link' );

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.