Deluxe Blog Tips About Projects

Make rel=publisher Passed W3 Validator

rel=publisher is a HTML piece that makes Google recognize (by rich snippet parser) the publisher of current page in search result. Unfortunately, the common implementation of rel=publisher by <link> tag is not validated by W3 Validator. Although W3 validator is just a guide and we don’t have to follow 100%, but we should if we can. This post shows a simple solution to make rel=publisher become valid.

rel=publisher validation

First, you need to remove <link rel="publisher" ...> tag in the header. In WordPress, if you added manually you’ll find it in header.php file of your theme. If you added using WordPress SEO plugin, remove it from SEO > Social > tab Google+ > box “Google Publisher Page:”.

Now you add this line into anywhere of your page, but not in <head> section:

<a href="">Google+</a>

Change YOUR-GOOGLE-ID to your google publisher page ID.

In WordPress, a good practice is adding to footer via hook wp_footer. Add the following code into functions.php file of your theme:

add_action( 'wp_footer', 'myprefix_google_publisher' );
function myprefix_google_publisher()
    echo '<a href="">Google+</a>';

This is tested by Google Rich Snippet Tool. Enjoy!

Subscribe to the Newsletter

Subscribe to get my latest content by email. I won't send you spam. Unsubscribe at any time.