// ===== 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"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:ai="https://schema.org/">
	<sitemap>
		<loc>https://www.organic-fertilizer.com.cn/geo-sitemap-posts-1.xml</loc>
		<ai:content_type>article</ai:content_type>
	</sitemap>
	<sitemap>
		<loc>https://www.organic-fertilizer.com.cn/geo-sitemap-pages-1.xml</loc>
		<ai:content_type>webpage</ai:content_type>
	</sitemap>
	<sitemap>
		<loc>https://www.organic-fertilizer.com.cn/geo-sitemap-categories-1.xml</loc>
		<ai:content_type>category</ai:content_type>
	</sitemap>
	<sitemap>
		<loc>https://www.organic-fertilizer.com.cn/geo-sitemap-home-1.xml</loc>
		<ai:content_type>website</ai:content_type>
	</sitemap>
</sitemapindex>