• Hi,
    I have a website with polylang and woocommerce.
    I want to hide woocommerce on one of the languages.
    I am using woocommerce storefront theme, which shows the basket in the main menu.
    I want to hide the woocommerce basket in the menu of a specific language, and had the idea to do it with custom css.
    Is it possible to use a css selector to target the css to a specific language?
    If not, any other suggestions on how to do this is highly appreciated.
    HC

Viewing 3 replies - 1 through 3 (of 3 total)
  • You can try the lang attribute selector:

    html[lang="en"] .my-class {
        display: none;
    }
    Thread Starter zkagen

    (@zkagen)

    Hi Leemon,

    Thanks for the suggestion, but it does not work.

    This works, but removes the cart for all laguages:

    @media screen and (min-width: 768px)
    {body.storefront-pro-active .site-header .site-header-cart {display: none;}}

    This does not have any effect:

    @media screen and (min-width: 768px)
    {html[lang="en"] body.storefront-pro-active .site-header .site-header-cart {display: none;}}
    • This reply was modified 7 years, 4 months ago by zkagen.
    Plugin Author Chouby

    (@chouby)

    Hi!

    You can try this: https://wordpress.org/support/topic/custom-css-for-specific-language/
    Or you can add a file such as en_US.css in your theme directory. It will be loaded only for en_US.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom css for specific language’ is closed to new replies.