Skip Navigation

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

Problem: I have built a custom Elementor Pro Header with a logo, navigation and contact button. When I create translations of the header, the button URL field is not visible

Solution: CLIENT UPDATE: I have just translated the HEADER itself, until now I only had an English version and now the buttons URLs do translate.

Relevant Documentation: - https://wpml.org/documentation/plugins-compatibility/elementor/

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 4 replies, has 3 voices.

Last updated by Kristof 1 year, 5 months ago.

Assigned support staff: Dražen Duvnjak.

Author Posts
June 19, 2020 at 4:13 pm #6413713

Kristof

I have built a custom Elementor Pro Header with a logo, navigation and contact button.
When I create translations of the header, the button URL field is not visible (screenshot 1) so I had a look at the String Translations.
The button has a data-id of 87adaa4 (screenshot 2) which, I think, corresponds with the String (screenshot 3) but as you can see, Translation is Complete, yet the translated urls do not work hidden link

Screenshot_3.jpg
Screenshot_2.jpg
Screenshot_1.jpg
June 22, 2020 at 10:06 am #6424893

Ahmed Mohammed

Thanks for contacting WPML support!

Registering the link can be done like the following example

'fields'     => array(
					'link' => array(
						'field'       => 'url',
						'type'        => __( 'Button: Link URL', 'sitepress' ),
						'editor_type' => 'LINK'
					),
				),

Can you please provide us with your widget code if you need help to register the widget correctly?

June 22, 2020 at 3:05 pm #6427573

Kristof

As the title label is clearly recognized by WPML, why would we need this custom php code? What if we have 50 such buttons? Button links inside our Elementor pages do get translated, but this button in the Elementor Header Template seems different for some reason.

Also the element shows up in the String Translation, but it seems it's not "in use".

What do you mean with widget code? It's the default Elementor button widget.

June 23, 2020 at 6:57 am #6431971

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

- What do you mean with widget code? It's the default Elementor button widget

My colleague thought you are using custom or not default Elementor widget, which might not be supported by WPML. If you are using the default Elementor button its link should be automatically translated to correspond to the translated page.

1) Can you please try to leave only Elementor and WPML plugins active, try to add button again and see if it translated correctly.

2) Try adding some other default Elementor widget and see if the issue exists.

3) Would you be interested in switching to Advanced translation editor, and try to check if URL translation works:

- https://wpml.org/announcements/2020/02/translating-links-with-advanced-translation-editor/

Let me know how it goes.

Thanks,
Drazen

June 23, 2020 at 7:45 am #6432461

Kristof

Hello,

I confirm that this is just the normal, default Elementor Button Widget, no custom code.
We know that internal links are supposed to be translated automatically because buttons in other parts of the pages do.

UPDATE: I have just translated the HEADER itself, until now I only had an English version and now the buttons urls do translate.

Problem fixed.