Yoast WordPress SEO plugin – Disable rel=”author” on pages on your WordPress website

Yoast WordPress SEO plugin – Disable rel=”author” on pages on your WordPress website

Yoast WordPress SEO is an awesome plugin for your WordPress powered website and/or blog to optimise your website for search engines. This plugin comes with inbuilt support to set rel=”author” on your webpages. This will help you to set up authorship for your blog. If you are using WordPress for just a website without blog, then you don’t need to worry about authorship. But if you are using WordPress, not just for your blog, but for your website CMS, then you don’t need to display authorship on your pages and your home page (where your home is a page of WordPress, not the blog index). But it’s important to display authorship for the blog posts you write. Yoast WordPress SEO does not have any settings to disable author metadata on your pages. So, when someone will search for something on Google and it displays your home page or any other page in the result, it’ll also display author information along with that, which is weird. So, you should disable pushing rel=”author” through your head on the pages.

To disable pushing rel=”author” through your head on the pages, you need to edit a single line of code of Yoast WordPress SEO plugin. Follow the following steps to do this.

  1. Locate the file named “class-frontend.php” in this path of your WordPress installation “wp-content/plugins/wordpress-seo/frontend”.
  2. Open the file in any text editor and search for “Outputs the rel=author”.
  3. Below this comment, you will find a function named “author”.
  4. Inside the function you will see a code which says if ( is_singular() ) {. Change is_singular to is_single. And you are done. Save the file now.

We provide WordPress consultancy service. So, if you need any help, please contact us. We also develop awesome high quality web application using PHP (CodeIgniter), MySQL and Ajax (jQuery).

4 thoughts on “Yoast WordPress SEO plugin – Disable rel=”author” on pages on your WordPress website

    1. Thank you for your comment. Yes, you need to reapply this every time you update the plugin. I will write about another method, so that you don’t need to reapply this every time you update the plugin.

  1. Good article. Another way to selectively deactivate Google Authorship is to add a nofollow rel=author tag to any page,post, or media you do not want to attribute Google Authorship to. This is a good way to do it if you have a multiple author blog where some authors do not want to attribute Authorship for whatever reason. I have tested this numerous time and it does work. You are simply telling Google to not follow the author profile link when you do it this way.

Leave a Reply