Compatability: All Shopify themes
I have multiple people who wants to assign a different image to their desktop user customers and mobile user customers. The step is very easy actually and just follow along.
Since some themes are written differently, you might need to hire a developer to do this for you. In some sections, this can be a little tricky since we need to add the class code to the section or the first container.
To start:
1. Go to Admin > Online store > Themes > Actions > Edit code
2. Open the section you want to edit. Then find the first "<" (angle bracket) that you see, and look for the class section.
3. Add the code below. NOTE: Make sure to provide a space.
If you do not have a "class" in your first "<", you can add one by using the format below. Paste the bold letters below.
4. Next, we will need to add a schema, so you do not have to the coding everytime. Go down to the {% schema %} section. Find the "settings", under the section. Add the code below after the "[", please make sure to watch the video for proper placement.
5. Next, we need to add the CSS file to hide and show on whatever choice of device you have. Go to Asset folder, and open the base.css or theme.css or theme.scss for others. Then add the code below. Make sure to SAVE
Copied!
39 comments
Hi for future readers,
Please contact us using chat with us for immediate reply.
Hello Team,
I have implemented this perfectly, although, mobile slideshow banner is showing on desktop. Mobile is functioning correctly. I have already reviewed suggestions in the comments & non are sufficient. Please contact, if someone can provide a solution or review my store coding that would be great. Thank you
Hi, thank you so much for the tutorial, I found it works for my website! Much appreciated!
Hi Mike,
We update our code constantly with Shopify theme updates.
It seems that the last code in the video is different from the last code provided. This could be the reason why desktop slideshow images are appearing on mobile instead of the mobile image, as reported by me and others.