WPML

问题概述

将 Shout 主题与 WPML 配合使用时,翻译后的项目会丢失主题的字段和布局设置,顶栏文本和页脚页面会保持为默认语言,某些简码的文本未被翻译,并且 vCard 小工具的文本无法翻译。上一篇和下一篇文章的链接也可能指向其他语言的文章。

临时解决方法

  1. 前往 WPML设置 并打开自定义 XML 配置选项卡。
  2. 添加此代码并保存:
    XML
    <wpml-config>
      <custom-fields>
          <custom-field action="translate">member_job</custom-field>
          <custom-field action="copy">_member_job</custom-field>
          <custom-field action="translate">member_byline</custom-field>
          <custom-field action="copy">_member_byline</custom-field>
          <custom-field action="translate">below_headings_text</custom-field>
          <custom-field action="copy">_below_headings_text</custom-field>
          <custom-field action="translate">testimonial_subheading</custom-field>
          <custom-field action="copy">_testimonial_subheading</custom-field>
          <custom-field action="translate">pirenko_rotating_text</custom-field>
          <custom-field action="copy">_pirenko_rotating_text</custom-field>
          <custom-field action="copy">featured_header</custom-field>
          <custom-field action="copy">_featured_header</custom-field>
          <custom-field action="copy">show_sidebar</custom-field>
          <custom-field action="copy">_show_sidebar</custom-field>
          <custom-field action="copy">sidebar_pos</custom-field>
          <custom-field action="copy">_sidebar_pos</custom-field>
      </custom-fields>
      <admin-texts>
        <key name="prk_shout_options">
          <key name="bar_left_text_1"/>
          <key name="theme_divider"/>
          <key name="woo_subheading"/>
          <key name="bottom_page_id"/>
        </key>
      </admin-texts>
      <shortcodes>
        <shortcode>
            <tag>pirenko_contact_info</tag>
            <attributes>
                <attribute>company_name</attribute>
                <attribute>street_address</attribute>
                <attribute>locality</attribute>
                <attribute>postal_code</attribute>
                <attribute>tel</attribute>
                <attribute>fax</attribute>
                <attribute>hours</attribute>
                <attribute>email</attribute>
            </attributes>
        </shortcode>
        <shortcode>
            <tag>prk_sitemap</tag>
            <attributes>
                <attribute>txt_pages</attribute>
                <attribute>txt_blog_cats</attribute>
                <attribute>txt_posts</attribute>
                <attribute>txt_port_posts</attribute>
            </attributes>
        </shortcode>
      </shortcodes>
    </wpml-config>
  3. 前往 WPML字符串翻译。翻译顶部栏文本,并将 bottom_page_id 翻译为已翻译的页脚页面的 ID。
  4. 再次翻译您的页面和项目,以便其翻译获取这些字段。
  5. 对于 vCard 小工具,请为每种语言添加一个小工具,并在小工具设置中设置其语言。
  6. 对于上一篇和下一篇文章链接,您可以在主题选项中关闭文章导航,直到主题作者修复此问题。

所有已知问题

需要有关此问题的帮助?

提出支持问题,我们将与您一起调查。