Zum Inhalt springen Zur Seitenleiste springen

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.

Hinterlasse eine Antwort

Bitte bleibe beim Thema und sei respektvoll zu anderen. Wenn du Hilfe bei Problemen benötigst, die nicht mit diesem Beitrag zusammenhängen, nutze unser Support-Forum, um einen Chat zu starten oder ein Ticket einzureichen.

Du kannst diese Tags verwenden:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>