تخطي إلى المحتوى تخطي إلى الشريط الجانبي

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>