- 状态
- 已解决
- 报告针对
- WPML SEO 2.1.0
- 解决于
- WPML SEO 2.2.0
- 主题标签
- Compatibility
问题概述
在采用每种语言使用不同的域名的多语言 WordPress 网站上使用 Divi 主题时,Yoast SEO XML 站点地图可能会显示错误的域名。
临时解决方法
在继续操作之前,请确保对您的站点进行完整备份。
- 打开 …/wp-content/plugins/wp-seo-multilingual/classes/class-wpml-wpseo-xml-sitemaps-filter.php 文件。
- 找到第 77 行。
- 将:
add_filter( 'wpseo_enable_xml_sitemap_transient_caching', [ $this, 'transient_cache_filter' ], 10, 0 );
- 替换为:
add_filter( 'wpseo_enable_xml_sitemap_transient_caching', [ $this, 'transient_cache_filter' ], PHP_INT_MAX, 0 );