问题概述
当与 WPML 结合使用FBomatic Automatic Post Generator 3.4.6.2 时,设置为次要语言的规则所生成的文章会获取默认语言的分类和标签,并且规则可能会更改同名现有分类的语言。此外,对于使用 WPML 翻译的文章,该插件的文章列表在已翻译的页面上为空,并且有两个列表文本无法翻译。
临时解决方法
对于文章列表及其文本:
- 前往WPML设置自定义 XML 配置。
- 添加此代码并保存:
<wpml-config><custom-fields><custom-field action="copy">fbomatic_parent_rule</custom-field></custom-fields><shortcodes><shortcode><tag>fbomatic-display-posts</tag><attributes><attribute>category_label</attribute></attributes></shortcode></shortcodes><admin-texts><key name="fbomatic_keyword_list"><key name="*"><key name="1"/></key></key></admin-texts></wpml-config> - 再次翻译文章和页面。
对于设置为次要语言的规则的分类项:
- 前往WPML分类法翻译并翻译该规则使用的分类和标签。
- 编辑每篇导入的文章并分配翻译后的分类项。
为防止规则更改现有分类的语言,请使用其他语言未使用的关键字和自动分类名称。