• Resolved sedlacekmartin

    (@sedlacekmartin)


    Hi!

    I need to hide some elements for vistitors with other laguage switched. For example in menu –
    Original language: MenuElement1 MenuElement2 MenuElement3 MenuElement4

    Translated: MenuElement1 MenuElement4 // (notice that elements 2 and 3 are missing when switched to other language).

    Also need simillar elements in page hidden (when switch to other langugage) too.

    How can i do it? I browsed 13 pages of support forum, but i couldn’t find it. Tried to use “exclude string from translation”, but it is not what i need.

    Maybe would help css “trick” display:none when language is switched??

    Thanks!

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

    If you want to hide elements on a translated language, you can use our shortcode. You can read more about it here: https://translatepress.com/docs/restrict-by-language/translation-shortcode/

    If you are using Elementor, you can do this directly from its interface: https://translatepress.com/docs/restrict-by-language/elementor-integration/

    Also, if you want to edit CSS on a certain language, you can do that with a bit of CSS that you can add via your Customizer interface: WordPress -> Appearance -> Customize -> Additional CSS

    Then add this css to it:

    body.translatepress-en_US {
        font-size: 35px;
    }

    Where en_US is the code for English (United State).
    If you want to edit the CSS for a different language, you can find that language’s code by going to: Settings -> TranslatePress -> General

    The following code is the example for the French version of the page:

    body.translatepress-fr_FR {
        font-size: 35px;
    }

    Best regards;
    Cristian

Viewing 1 replies (of 1 total)
  • The topic ‘Want to not some elements visible after language change’ is closed to new replies.