Salta la navigazione

Resolved by author

Topic Tags: Compatibility

Overview of the issue

When using the Kadence Block‘s “Advanced Button” to create a single button link pointing to an internal page, WPML does not automatically translate the internal link to its corresponding translated version.

Workaround

To enable automatic translation of these internal links, follow these steps:

  • Go to WPML > Settings > Custom XML Configuration.
  • Add the following XML code and click “Save”:
    <wpml-config>
      <gutenberg-blocks>
        <gutenberg-block type="kadence/singlebtn" translate="1">
          <key name="link" type="link" />
          <key name="text" />
        </gutenberg-block>
        <gutenberg-block type="kadence/advancedheading" translate="1">
    			<xpath>//*[self::h1 or self::h2 or self::h3 or self::h4 or self::h5 or self::h6 or self::p or self::div or self::span.wp-block-kadence-advancedheading]</xpath>
          <xpath type="link">//a/@href</xpath>
    	</gutenberg-block>
      </gutenberg-blocks>
    </wpml-config>
    

Specifying type=”link” for the link attribute enables WPML to automatically translate the URL. For further guidance on configuring custom Gutenberg blocks, refer to our documentation on How to make custom Gutenberg blocks translatable.

Lasciare una risposta

Ti preghiamo di rimanere in tema e di essere rispettoso nei confronti degli altri. Se hai bisogno di aiuto per questioni non correlate a questo post, utilizza il nostro Forum di supporto per avviare una chat o inviare un ticket.

Potete usare questi tag:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>