ข้ามไปยังเนื้อหาหลัก ข้ามไปยังแถบด้านข้าง

Waiting for author

Topic Tags: Compatibility

Overview of the issue

When using Woodmart with WPML, you might experience an issue where some blocks are not translated on the frontend, even though translations are completed in the Advanced Translation Editor (ATE). This occurs when the title block uses the icon format that wraps the heading text inside a <span> tag or when the paragraph block is inside a slider and uses a <span> tag instead of a <p> tag.

Workaround

  • Go to WPML > Settings > Custom XML Configuration.
  • Add the following code and save.
    <wpml-config>
      <gutenberg-blocks>
        <gutenberg-block type="wd/title" translate="1" label="[Woodmart] Title">
          <xpath>//*[self::h1 or self::h2 or self::h3 or self::h4 or self::h5 or self::h6 or self::div.title or self::p or self::h2.span or self::span]</xpath>
        </gutenberg-block>
        <gutenberg-block type="wd/paragraph" translate="1" label="[Woodmart] Paragraph">
    			<xpath>*[self::p or self::span]</xpath>
    		</gutenberg-block>
      </gutenberg-blocks>
    </wpml-config>
            
  • Make a small edit on the original and resave it.
  • Enter the translation and resave it.

แสดงความคิดเห็น

โปรดอยู่ในหัวข้อและให้ความเคารพผู้อื่น หากคุณต้องการความช่วยเหลือในประเด็นที่ไม่เกี่ยวข้องกับโพสต์นี้ ให้ใช้ฟอรัมสนับสนุนของเราเพื่อเริ่มการแชทหรือส่งตั๋ว.

คุณสามารถใช้แท็กเหล่านี้:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>