דלג לתוכן דלג לסרגל צד

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>