Overview of the Issue
When using Ghost Kit with WPML, the headings of the Accordion block and the titles of the Tabs block stay in the default language on translated pages.
Workaround
- Go to WPMLSettings and open the Custom XML Configuration tab.
- Add this code and save:
XML
<wpml-config> <gutenberg-blocks> <gutenberg-block type="ghostkit/accordion-item" translate="1"> <xpath>//*[contains(@class,"ghostkit-accordion-item-heading")]//span[contains(@class,"ghostkit-accordion-item-label")]</xpath> </gutenberg-block> <gutenberg-block type="ghostkit/tabs-v2" translate="1"> <xpath>//div[contains(@class,"ghostkit-tabs-buttons")]/*[contains(@class,"ghostkit-tabs-buttons-item")]</xpath> </gutenberg-block> </gutenberg-blocks> </wpml-config>
- Update the translations of the pages that use these blocks.