Resolved by author
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.