Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

What is the best way to hide elements on specific devices on GeneratePress?

  • Hi, I’m hoping someone can help me with this.

    What is the best way to hide elements on specific devices when using GeneratePress?

    Is there a specific add-on or official plugin or anything, like Astra pro have?

    I tried adding custom CSS classes and using CSS, but there seems to some issue, where it’s only working if I add one class at a time, but not when adding multiple.

    Any help with this would be greatly appreciated.

    Thanks in advance,
    M.

  • Hi there,

    Just to confirm, are you referring to content created with the Elements module?
    https://docs.generatepress.com/article/elements-overview/

    Let me know 🙂

  • Sorry, I ended up figuring this out myself.

    I meant just stuff in general, but I discovered this, which worked perfectly:

    Using our hide-on-* classes

    To hide/show certain contents depending on devices, you can use the three handy built-in classes below:

    hide-on-mobile
    hide-on-tablet
    hide-on-desktop

  • Glad to hear 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.