How do I hide this one specific section on mobile?

Topic summary

A user seeks to hide an “Also available in this color” section on mobile devices only for their Shopify store.

Initial Solution Provided:

  • Add CSS code to the theme.liquid file below the <head> tag to hide the block on mobile
  • Instructions include a reference screenshot showing code placement

Limitation Identified:

  • The block lacks a unique ID, making it impossible to target just this specific instance
  • Hiding it would affect all similar blocks across the site
  • Product-by-product hiding is possible but not “future proof” or scalable

Current Status:

  • User acknowledges the limitation and considers potentially hiding by collection instead
  • Discussion remains open as the user explores alternative approaches
Summarized with AI on November 10. AI used: claude-sonnet-4-5-20250929.

I’m trying to hide this one section – “Also available in this color” on mobile only. I’ve searched all similar posts but still can’t figure it out… :thinking:

Thank you in advance!

https://4a3474-24.myshopify.com/collections/travel-umbrella/products/travel-umbrella-neon-pink

Hey @LindStuart ,

Go to your theme’s “Edit Code” Option, then in the search bar type “theme.liquid”
Below the tag “” tag paste the following. Screenshot attached for reference.


Screenshot is for reference only, the correct code to paste is the one shown above.

Thank you so much! Question, though – is it possible to just hide this specific block? I may want to add the same type of block later and have that one show on mobile… if that makes sense.

Unfortunately not for this one, The way I see it, it doesn’t have a unique ID, so it won’t be possible to hide this specific block. There might be one way, but then you would have to hide it for every single product one by one and that’s not very “future proof” code.

Btw, if you’re only looking to hide it for this product only, then you can use this code. The instructions are the same as shown above.


ahh, got it – thank you for the help! maybe I can do it by collection…