// ===== SEO FIX: Remove noindex, allow search engine indexing =====
remove_action('wp_head', 'noindex');
remove_action('wp_head', 'wp_robots');

add_filter('wp_robots', function($robots) {
    unset($robots['noindex']);
    unset($robots['nofollow']);
    $robots['index'] = true;
    $robots['follow'] = true;
    return $robots;
}, 999);
// ===== SEO FIX END =====


// 修复：使用输出缓冲强制移除页面中的noindex标签
add_action('template_redirect', function() {
    ob_start(function($buffer) {
        // 移除所有包含noindex的robots meta标签（支持各种格式）
        $buffer = preg_replace('/<meta\s+name=["\']robots["\']\s+content=["\'][^"\']*noindex[^"\']*["\']\s*\/?>/i', '', $buffer);
        return $buffer;
    });
});

<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//www.organic-fertilizer.com.cn/wp-content/plugins/wordpress-seo/css/main-sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<sitemap>
		<loc>https://www.organic-fertilizer.com.cn/post-sitemap.xml</loc>
		<lastmod>2026-10-04T05:43:21+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.organic-fertilizer.com.cn/page-sitemap.xml</loc>
		<lastmod>2026-10-04T05:43:21+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.organic-fertilizer.com.cn/category-sitemap.xml</loc>
		<lastmod>2026-10-04T05:43:21+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.organic-fertilizer.com.cn/post_tag-sitemap.xml</loc>
		<lastmod>2026-10-04T05:41:17+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.organic-fertilizer.com.cn/author-sitemap.xml</loc>
		<lastmod>2026-10-03T08:02:02+00:00</lastmod>
	</sitemap>
</sitemapindex>
<!-- XML Sitemap generated by Yoast SEO -->