Blog SEO Diagnostic Records: Thin Content Tabs NoIndex Scheme Practical and Multilingual Test Validation
In the previous SEO diagnostics, I found that the blog hasNearly 15,000 pages are not indexed, with about 6000 thin content tabs. In order to avoid these only sporadic tabs dragging down the quality score of the entire site, I have formulated a ‘Quality Control Flow’ strategy:Do not delete the label for the time being, but automatically add the number of articles < 2 on the code level <meta name='GoogleBot' content='noindex, follow'>.
This not only retains the original structure of the website, but also clearly informs search engines that these low-quality pages are not indexed for the time being. The following is the whole process of actual combat implementation and testing based on WordPress + Polylang multi-language.
1. Code implementation: hook interception and dynamic injection
in the theme functions.php In the file, I added the following code snippet, via WordPress’s wp_head Hook dynamically injected noindex tag:

(As shown in the figure above, after line 57 is inserted Noindex dynamic injection logic)
// 为文章数小于2的薄内容标签页添加 noindex 标签
add_action( 'wp_head', 'add_noindex_to_thin_tag_pages' );
function add_noindex_to_thin_tag_pages() {
// 仅在标签归档页面执行
if ( is_tag() ) {
// 获取当前标签对象
$tag = get_queried_object();
// 判断是否存在且文章计数小于2
if ( $tag && isset( $tag->count ) && $tag->count < 2 ) {
// 针对您需求中的 Googlebot
echo '<meta name="googlebot" content="noindex, follow">' . "\n";
// 建议同时添加通用 robots 标签,以便 Bing、百度等其他搜索引擎也遵循此规则
echo '<meta name="robots" content="noindex, follow">' . "\n";
}
}
}
The core logic is simple: use is_tag() Determine the current page, pass get_queried_object() Get the current tag object and its poll Properties, if the count is less than 2, the noindex tag is output.
2. In-depth analysis: the underlying mechanism of polylang multilingual tags
Many students may have questions: in multilingual environments,$tag->count In the end, is the total number of articles in the whole site, or the number of articles in the current language? This starts with the underlying implementation mechanism of Polylang.
When Polylang processes multilingual tags,Instead of overlaying multilingual fields on a label (term), create a separate term for each language.
For example: there is a tag ‘BSC’ under the Chinese language, when I add another tag ‘BSC’ under the English language, the database actually generatesTwo independent Terms with different IDs. Polylang only automatically maintains the ‘translation’ relationship between the two different IDs through its internal data table.
Because of this, WordPress native article counting logic is naturally isolated by language. ‘BSC’ (Term ID: A) in Chinese $tag->count Only the articles attributable to the Chinese site are calculated, and the English ‘BSC’ (Term ID: B) $tag->count Only articles belonging to English sites are calculated, and the two do not interfere with each other. This is also the core reason why our short code above can accurately control the flow according to the language dimension without making a special language judgment.
3. Cache cleaning: ensure that the code takes effect
After the code modification is completed, since the W3 Total Cache plug-in is enabled on the site, there is a static cache on the front-end page, and the cache must be completely emptied to make the newly injected meta tag reflected in the front-end source code.

(As shown in the figure above, click ‘Clear all caches’ to ensure that the modification takes effect immediately)
4. Practical test: Chinese and English bilingual tab source code verification
In order to verify the accuracy of the code in the Polylang environment, I selected two sets of labels to test:‘BSC’ label (1 article) And ‘Mouse’ label (2 articles), and view the source code of the web page respectively in Chinese and English paths.
1. Thin content labels for a single article (expected: Noindex)
Chinese path test ( (/tag/bsc/):
In the source code of the web page, the meta tag we injected was successfully matched, indicating that the logic of the Chinese tab of a single article took effect.

English path test ( (/en/tag/bsc/):
Since polylang is independently counted in language, only 1 article is also belonged to the English label, so the noindex tag is also successfully output in the source code of the English page.

2. The compliance label of the two articles (expected: no noindex)
Chinese path test ( (/tag/mouse/):
There are 2 articles under this label that reach our indexing threshold. Looking at the source code, the head does not appear name='GoogleBot' Noindex tag, only the default WordPress default max-image-preview:large.

English path test ( (/en/tag/mouse/):
Similarly, the English version of the label also contains 2 articles, and the source code also does not intercept the index label, which allows search engines to index normally.

5. Test conclusions
After verification, this code deployment perfectly achieved the expected goal:
- ✅
https://www.shuijingwanwq.com/en/tag/bsc/(1 article) – Havename='GoogleBot' - ✅
https://www.shuijingwanwq.com/en/tag/%e9%bc%a0%e6%a0%87/(2 articles) – Noname='GoogleBot' - ✅
https://www.shuijingwanwq.com/en/tag/bsc/(1 article) – Havename='GoogleBot' - ✅
https://www.shuijingwanwq.com/en/tag/%e9%bc%a0%e6%a0%87/(2 articles) – Noname='GoogleBot'
About the influence of the indexed page: For those tabs that have only 1 article and have been included by Google, after adding this tag, Googlebot will read it the next time you crawl noindex directive, which is removed from the index library. This is exactly the ‘detoxification’ process we expect. At the same time, since we declared follow, the link weights on the page can still pass normally to that only article, realizing the realLow cost and high income.