• Resolved montythebrave

    (@montythebrave)


    If I have some codes I am putting into the “Custom Code” section of elementor then go to save the code it pops up to ask me the conditions i.e what pages I want the code to appear.

    Lets say I have a website with English which also has Italian (Translated with translatepress) how do I select the Italian page versions only? I only see an option for the English pages since the Italian are not physical pages they are just generated by translatepress.

Viewing 1 replies (of 1 total)
  • Hello there,

    You are right about this, there isn’t yet a way to select on which language(s) to display the custom code inserted with Elementor.

    A workaround for this (that might not work in your case) is to add the custom code in a span or div element and assign to it a CSS class and then using your Customizer interface (WordPress -> Appearance -> Customize -> Additional CSS), you can “hide” the code from certain languages.

    For example, let’s say that this is your custom code added with Elementor:

    <div class="trp-text-en">
      English text
    </div>

    The CSS code to “hide” this from being displayed on the Spanish version of the side is the following:

    .translatepress-es_ES .trp-text-en {
      display: none;
    }

    You can use this example for any other language, simply change the es_ES part of the .translatepress-es_ES class to any other language code that you need. You can find the language codes used on your site by going to Settings -> TranslatePress -> General tab and looking in the Code column of the All languages table.

    I have created a task for our development team regarding this issue and they will add support for this in the future, but due to the nature of development, I can’t give you a time frame for when that will happen.

    Best regards,
    Cristian

Viewing 1 replies (of 1 total)
  • The topic ‘Elementor Custom Code – Conditions’ is closed to new replies.