Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
If you're experiencing issues with line breaks in the Divi 'Call to Action' module titles not translating correctly and appearing as visible HTML tags in French, we can help.

Solution:
1. Navigate to WPML > Settings > Custom XML Configuration.
2. Add the following XML configuration to allow HTML tags in the titles:

<wpml-config>
  <shortcodes>
      <shortcode>
            <tag label="Call To Action: Content">et_pb_cta</tag>
            <attributes>
                <attribute label="Call To Action: Title" encoding="allow_html_tags">title</attribute>
                <attribute label="Call To Action: Title (phone)">title_phone</attribute>
                <attribute label="Call To Action: Title (tablet)">title_tablet</attribute>
                <attribute label="Call To Action: Title (hover)" encoding="allow_html_tags">title__hover</attribute>
                <attribute label="Call To Action: Admin Label">admin_label</attribute>
                <attribute label="Call To Action: Content (phone)" encoding="allow_html_tags">content_phone</attribute>
                <attribute label="Call To Action: Content (tablet)" encoding="allow_html_tags">content_tablet</attribute>
                <attribute label="Call To Action: Content (hover)" encoding="allow_html_tags">content__hover</attribute>
                <attribute label="Call To Action: Button Text">button_text</attribute>
                <attribute label="Call To Action: Button Text (phone)">button_text_phone</attribute>
                <attribute label="Call To Action: Button Text (tablet)">button_text_tablet</attribute>
                <attribute label="Call To Action: Button URL" type="link">button_url</attribute>
                <attribute label="Call To Action: Option URL" type="link">link_option_url</attribute>
                <attribute label="Call To Action: Background Image" type="media-url">background_image</attribute>
                <attribute label="Call To Action: Background Image (hover)" type="media-url">background_image__hover</attribute>
            </attributes>
        </shortcode>
  </shortcodes>
</wpml-config>

3. Resave your original page and then resave your translation.

If this solution does not resolve your issue or seems outdated, please check the related known issues and confirm that you have installed the latest versions of themes and plugins. If the problem persists, we highly recommend opening a new support ticket for further assistance.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: ,

This topic contains 0 reply, has 0 voices.

Last updated by maxenceD 9 months, 1 week ago.

Assisted by: Waqas Bin Hasan.

Author Posts
March 11, 2025 at 9:40 am

maxenceD

Background of the issue:
My site is in English and I'm trying to translate it into French. The titles of the Divi 'Call to Action' module in English include a line break . When I translate it into French and leave this line break, it appears as , visible on the page. I would like the line break in the titles of the 'CTA' module of the Divi theme to be translated as and not be visible on the page but cause a line break, as in the English version of the site.

Symptoms:
The line break in the CTA title translates into and is visible on the page.

Questions:
How can I ensure that the line break in the CTA titles is translated correctly and not visible on the page?

March 11, 2025 at 11:18 am #16801075

maxenceD

Can you please resend ticket email as I have changed my email address in WPML account. This is an old WPML account and I have no more access to the old email.
I've just changed my address.
Thank you.

March 11, 2025 at 1:28 pm #16801969

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

I can see "md@eredit.io" as your email address on profile and unfortunately we can not send replies to another email. This message should reach you on the email on your profile.

March 11, 2025 at 2:49 pm #16802367

maxenceD

Thank you md@eredit.io is one of my current email.
I did not receive your message on that mailbox tho, please just let me know when you have finished review my problem for me to move forward with this website.
Thanks again for your precious help.

March 12, 2025 at 10:42 am #16806382

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for your patience and cooperation, I've escalated the issue to the relevant team and 'll update you as soon as I hear back.

Besides this, you can enable notifications for this ticket to land in your mailbox, by enabling it from the right sidebar on this ticket. Please see "Notifications" section and click the bell icon to expand and turn on (see attached).

notification.jpg
March 14, 2025 at 1:12 pm #16816958

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for your patience and cooperation.

Our team suggested the following:

- Go to "WPML > Settings > Custom XML Configuration"
- Add the following code:

<wpml-config>
  <shortcodes>
      <shortcode>
            <tag label="Call To Action: Content">et_pb_cta</tag>
            <attributes>
                <attribute label="Call To Action: Title" encoding="allow_html_tags">title</attribute>
                <attribute label="Call To Action: Title (phone)">title_phone</attribute>
                <attribute label="Call To Action: Title (tablet)">title_tablet</attribute>
                <attribute label="Call To Action: Title (hover)" encoding="allow_html_tags">title__hover</attribute>
                <attribute label="Call To Action: Admin Label">admin_label</attribute>
                <attribute label="Call To Action: Content (phone)" encoding="allow_html_tags">content_phone</attribute>
                <attribute label="Call To Action: Content (tablet)" encoding="allow_html_tags">content_tablet</attribute>
                <attribute label="Call To Action: Content (hover)" encoding="allow_html_tags">content__hover</attribute>
                <attribute label="Call To Action: Button Text">button_text</attribute>
                <attribute label="Call To Action: Button Text (phone)">button_text_phone</attribute>
                <attribute label="Call To Action: Button Text (tablet)">button_text_tablet</attribute>
                <attribute label="Call To Action: Button URL" type="link">button_url</attribute>
                <attribute label="Call To Action: Option URL" type="link">link_option_url</attribute>
                <attribute label="Call To Action: Background Image" type="media-url">background_image</attribute>
                <attribute label="Call To Action: Background Image (hover)" type="media-url">background_image__hover</attribute>
            </attributes>
        </shortcode>
  </shortcodes>
</wpml-config>

- Resave your original page.
- Resave your translation.

We've tried this in our test site and it fixes the said problem.

Please note that if you are using other types of titles such as title phone or tablet, you can add encoding="allow_html_tags" to these too.

Please try and let me know.

March 14, 2025 at 1:31 pm #16817030

maxenceD

Hello Waqas;
It works like a charm, thanks a lot!
I close this ticket as everything is working fine 🙂
Have a nice day.