Robots noindex on categories/archives despite being used for sitemaps plugin

MVP

This pluign won't work becuase the archive used for the sitemap are noindexed defeating the whole point.

grep is your friend.

Comments

  • workaround

        public function categoriesController_render_before($sender, $args) {
            if ($sender->RequestMethod == 'archives') {
                $sender->Head->clearTag('meta', ['name' => 'robots', 'content' => 'noindex']);
           }
        }
    


    grep is your friend.

  • Where to add the workaround code? I am suffering same issue and Google Search Console is irritating.

Sign In or Register to comment.