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.

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

Problem: I am trying to: translate my Elementor template but my template css is not working because i have some style in original language but when i translate it, it is not work correctly.
It regenerate different ID. I inspect my page and put the correct css class (elementor-24) and it is work, how can i do to not translate the Elementor template id ?

Solution: Everytime time a post type is translated, it's actually created a new instance of the post type with the information in the secondary language, which means that it's not possible to keep the same ID of the element in both languages. This is a WordPress restricction, not a WPML restricction.

In this case I recommend you to aplpy the CSS based on a different criteria than the ID, or to include the ID of the translated template in the CSS class, e.g:

#id-element-default-lang, #id-element-secondary-language{
 /* Your code goes here */
}

Relevant Documentation:

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Carlos Rojas 5 months, 3 weeks ago.

Assigned support staff: Carlos Rojas.

Author Posts
April 25, 2019 at 10:09 am #3680999

nishanthaT

I am trying to: translate my Elementor template but my template css is not working because i have some style in original language but when i translate it, it is not work correctly.
It regenerate different ID. I inspect my page and put the correct css class (elementor-24) and it is work, how can i do to not translate the Elementor template id ?

April 25, 2019 at 6:16 pm #3684963

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Montevideo (GMT-03:00)

Hello,
Thank you for contacting WPML support.

1.- Everytime time a post type is translated, it's actually created a new instance of the post type with the information in the secondary language, which means that it's not possible to keep the same ID of the element in both languages. This is a WordPress restricction, not a WPML restricction.

In this case I recommend you to aplpy the CSS based on a different criteria than the ID, or to include the ID of the translated template in the CSS class, e.g:

#id-element-default-lang, #id-element-secondary-language{
 /* Your code goes here */
}

2.- Please update all outdated plugins and themes, specially WPML plugins, to their latest version. Outdated functionalities can cause conflicts in the code.

Note: Don't forget to create a full backup of the site before making any change, this is for security reasons.

3.- Please increase the PHP Memory Limit. Minimum requirements are 128Mb: https://wpml.org/home/minimum-requirements/
You can add this to wp-config.php to increase WP memory:

/** Memory Limit */
define('WP_MEMORY_LIMIT', '128M');
define( 'WP_MAX_MEMORY_LIMIT', '128M' );

- Add it above the line /* That's all, stop editing! Happy blogging. */

Kind regards,
Carlos

April 26, 2019 at 2:45 pm #3691683

nishanthaT

Hello, thanks you for your help and answer 🙂

April 26, 2019 at 3:04 pm #3691777

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Montevideo (GMT-03:00)

Hi there,

I'm glad to hear that the issue is solved 🙂

Please don't hesitate to contact us if you need our help in the future with WPML. We will be more than happy to help.
Best regards,
Carlos