Comment on Technical Support by Adam Houston.

WordPress Technical Support Hi there, your plugin seems great. I was skeptical at first since I really love Yoast’s WordPress SEO in general. I was *just* about to noindex all my paged blog archives since I was tired of them always showing up above real blog posts themselves in search results. But I hated the idea of losing all that link value, so I was searching for a way to use rel=canonical. Your plugin is exactly what I needed.

HOWEVER when I first activated it and turned on the setting “Index Home Page Only : Block Paged 2,3,4…”, my blog’s page archives were pointing to the home page of the site (not the home page of the BLOG… which is a different page).

I have 2 suggestions…

1) rename that setting to “index main blog page only…” vs. “index home page only…” since that’s actually what the setting is really designed to do anyway. It’s only the home page if your home page IS your main blog page/posts page.

2) fix the code in your plugin so that it works for people who have set a different page for their main posts page (not the home page).

The funny thing is, when I went into your code to edit stallion-wordpress-seo-plugin/admin/class-settings.php I found the appropriate code around line 870… You already have the exact code I needed, but it was just commented out!!!?!? I’m not quite sure why, but maybe it was an oversight on your part and not intentional. :) But after I cleaned it up the code that is left works exactly right. It’s your code, so you get the credit, but I just wanted you to know since I think you should probably make these changes permanent.

Here’s the way the updated/edited code reads (works perfectly on my site), starting at line 866:

    } elseif (is_home() || is_front_page()) {
      if ( !isset( $options['st_seo_notindex_home'] ) ) {
        $options['st_seo_notindex_home'] = '0' ;
      }
      // Index Home Paged Archives : do nothing

      // Index Home Page Only : Block Paged 2,3,4...^^
      if ($options['st_seo_notindex_home'] == "2") {
          if ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) ) {
            $posts_page = get_permalink( get_option( 'page_for_posts' ) );
          } else {
            $posts_page = home_url( '/' );
          }
          add_filter( 'wpseo_canonical', '__return_false' );
          add_filter( 'aioseop_canonical_url', '__return_false' );
          remove_action( 'wp_head', 'rel_canonical' );
          if ($options['st_seo_notindex_clean'] == "2") {
            echo "\n<!-- Stallion WordPress SEO Plugin 3.0.0 by David Cameron Law https://stallion-theme.co.uk/stallion-wordpress-seo-plugin/ -->\n";
          }
          echo "\n";
          if ($options['st_seo_notindex_clean'] == "2") {
            echo "<!-- Index Home Page Only : Block Paged 2,3,4...^^ - Stallion SEO -->\n";
          }
      }
    } elseif (is_author()) {

As proof of the issue that’s fixed by restoring the above code, see the before and after here. I was on page 9 of the blog archives and expect/want the canonical to point to the first/main page of the blog. But it wasn’t… it was pointing to the home page (not the blog). But now it’s fixed!

Here was how my canonical tag looked like with your original code (plugin version 3.0.0): http://imgur.com/a/2dFhM

And here is how it looks now (fixed!): http://imgur.com/a/Hpznb