We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

How do I display different images for mobile and desktop on image banner with the Trade theme?

Solved

How do I display different images for mobile and desktop on image banner with the Trade theme?

Jason10
Excursionist
11 0 1

I want the Image banner section on the front page to be displayed with a different picture on the mobile version, because the image height on the mobile page is way too short which i really don't like even it's already set to "large". How can I do that? 

 

Also, is it possible to change the text content position to bottom/top instead of just at the middle section? 

 

Any help is greatly appreciated!

Accepted Solutions (8)

Huptech-Web
Shopify Partner
1169 234 265

This is an accepted solution.

Hey @Jason10 
please try this code with dynamic options 

{%- style -%}
  @media screen and (min-width: 821px) {
   {%if section.settings.about-image-main-mobile %}
    .collection-banner-container {
      background-image: url('{{ section.settings.about-image-main-2 | img_url: 'master' }}');
      min-height: 400px;
      height: 100%;
    }
  {% endif %}
  }
  @media screen and (max-width: 820px) {
    {% if  section.settings.about-image-main-mobile %}
    .collection-banner-container {
      background-image: url('{{ section.settings.about-image-main-mobile | img_url: 'master' }}');
      min-height: 750px;
      height: 100%;
      background-position: bottom;
    }
  {% endif %}
  }
{%- endstyle -%}

<div class="collection-banner-container">
</div>

{% schema %}
  {
    "name": "Collection Banner",
    "settings": [
      {
        "type": "image_picker",
        "label": "Collection Banner Background Image Desktop",
        "id": "about-image-main-2"
      }, {
        "type": "image_picker",
        "label": "Collection Banner Background Image Mobile",
        "id": "about-image-main-mobile"
      }
    ]
  }
{% endschema %}

If you need further assistance, please let me know. If you found my help useful, consider liking this message and marking it as the solution.
Thank you
K.K

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required

View solution in original post

Huptech-Web
Shopify Partner
1169 234 265

This is an accepted solution.

@Jason10 , Dynamic options allow you to change your image using theme options, similar to the image.

Rishihuptech_0-1722498328675.png

 

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required

View solution in original post

Huptech-Web
Shopify Partner
1169 234 265

This is an accepted solution.

Hi @Jason10,

Firstly, please provide a screenshot and the page URL showing where you want to display different images for mobile and desktop. This will help me to provide you with the appropriate code and file name and assist you better.
Thank you 
K.K

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required

View solution in original post

Huptech-Web
Shopify Partner
1169 234 265

This is an accepted solution.

got it @Jason10 can you please send this banner file code also 

thanks 
K.K

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required

View solution in original post

Huptech-Web
Shopify Partner
1169 234 265

This is an accepted solution.

hey @Jason10 is it possible to add me as a staff on kaushik@huptechweb.com this mail i'll add the code and then provide a small video on how to add images using theme options 

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required

View solution in original post

Huptech-Web
Shopify Partner
1169 234 265

This is an accepted solution.

@Jason10 if you don't know how to add staff members please follow this Steps:

  1. From your Shopify admin, click Settings > Users and permissions.
  2. Click Add Staff.
  3. Enter the staff members' full name and their email address.
  4. Do either of the following:
    • Select which permissions you want to give the staff member.
    • To give the staff member all available permissions, click Select All.
  5. Click Send Invite.
If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required

View solution in original post

Huptech-Web
Shopify Partner
1169 234 265

This is an accepted solution.

I'll send the collaborator request please check and accept 

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required

View solution in original post

Huptech-Web
Shopify Partner
1169 234 265

This is an accepted solution.

Hey @Jason10, the changes have been made from my end. I will send a Google Meet invitation to explain how to add the second image and all the other details. Please check your store email.

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required

View solution in original post

Replies 22 (22)

oscprofessional
Shopify Partner
16407 2444 3196

Hello @Jason10 I have checked your issue
can you please use mobile view and desktop view 2 different images
please check this

oscprofessional_0-1722423919951.png

if any other help, please connect with us

Hire us | Pass Core Web Vital | B2B Wholesale Experts | Claim Your Free Website Review |
Connect with Us: WhatsApp | Skype: oscprofessionals-87 | Email: pallavi@oscprofessionals.com |
Custom Shopify SolutionsPrivate Apps, Theme Customization & SEO | Digital Marketing |
OSCP Apps: Discount Suite | Wholesale App | Bundle & Upsell | Shipping Discount | and more...
Jason10
Excursionist
11 0 1

Thanks for the reply. No I can only upload 1 picture for the image banner, so the picture on both desktop and mobile view are the same picture.

oscprofessional
Shopify Partner
16407 2444 3196

@Jason10Can you please share your store URL?

Hire us | Pass Core Web Vital | B2B Wholesale Experts | Claim Your Free Website Review |
Connect with Us: WhatsApp | Skype: oscprofessionals-87 | Email: pallavi@oscprofessionals.com |
Custom Shopify SolutionsPrivate Apps, Theme Customization & SEO | Digital Marketing |
OSCP Apps: Discount Suite | Wholesale App | Bundle & Upsell | Shipping Discount | and more...
Jason10
Excursionist
11 0 1

Ulnar.co

Huptech-Web
Shopify Partner
1169 234 265

This is an accepted solution.

Hey @Jason10 
please try this code with dynamic options 

{%- style -%}
  @media screen and (min-width: 821px) {
   {%if section.settings.about-image-main-mobile %}
    .collection-banner-container {
      background-image: url('{{ section.settings.about-image-main-2 | img_url: 'master' }}');
      min-height: 400px;
      height: 100%;
    }
  {% endif %}
  }
  @media screen and (max-width: 820px) {
    {% if  section.settings.about-image-main-mobile %}
    .collection-banner-container {
      background-image: url('{{ section.settings.about-image-main-mobile | img_url: 'master' }}');
      min-height: 750px;
      height: 100%;
      background-position: bottom;
    }
  {% endif %}
  }
{%- endstyle -%}

<div class="collection-banner-container">
</div>

{% schema %}
  {
    "name": "Collection Banner",
    "settings": [
      {
        "type": "image_picker",
        "label": "Collection Banner Background Image Desktop",
        "id": "about-image-main-2"
      }, {
        "type": "image_picker",
        "label": "Collection Banner Background Image Mobile",
        "id": "about-image-main-mobile"
      }
    ]
  }
{% endschema %}

If you need further assistance, please let me know. If you found my help useful, consider liking this message and marking it as the solution.
Thank you
K.K

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required
Jason10
Excursionist
11 0 1

Thanks for the help! I’m sorry may I ask what is dynamic options? I’m not sure where should I paste the code to🙏

Huptech-Web
Shopify Partner
1169 234 265

This is an accepted solution.

@Jason10 , Dynamic options allow you to change your image using theme options, similar to the image.

Rishihuptech_0-1722498328675.png

 

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required
Jason10
Excursionist
11 0 1

Sorry I'm confused. Where should I paste the code to? And i don't have the "collection banner" template available in my "Trade" shopify theme, that's how it looks like on my end:

螢幕擷取畫面 2024-08-01 165631.png

Thanks!

Huptech-Web
Shopify Partner
1169 234 265

This is an accepted solution.

Hi @Jason10,

Firstly, please provide a screenshot and the page URL showing where you want to display different images for mobile and desktop. This will help me to provide you with the appropriate code and file name and assist you better.
Thank you 
K.K

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required
Jason10
Excursionist
11 0 1

Sure, URL is https://ulnar.co/

Image on the front page:

螢幕擷取畫面 2024-08-01 221442.png

Thanks!

Huptech-Web
Shopify Partner
1169 234 265

This is an accepted solution.

got it @Jason10 can you please send this banner file code also 

thanks 
K.K

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required
Jason10
Excursionist
11 0 1

Sure, where can I find the banner file code? Thanks

Huptech-Web
Shopify Partner
1169 234 265

This is an accepted solution.

hey @Jason10 is it possible to add me as a staff on kaushik@huptechweb.com this mail i'll add the code and then provide a small video on how to add images using theme options 

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required
Jason10
Excursionist
11 0 1

Sorry my Basic Shopify plan doesn’t come with a staff account function🙏

Huptech-Web
Shopify Partner
1169 234 265

This is an accepted solution.

@Jason10 if you don't know how to add staff members please follow this Steps:

  1. From your Shopify admin, click Settings > Users and permissions.
  2. Click Add Staff.
  3. Enter the staff members' full name and their email address.
  4. Do either of the following:
    • Select which permissions you want to give the staff member.
    • To give the staff member all available permissions, click Select All.
  5. Click Send Invite.
If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required
Jason10
Excursionist
11 0 1

That’s what I see on my end:
IMG_2989.jpeg

And if you’re referring to the collaborator function, my collaborator request code is 1762.

Huptech-Web
Shopify Partner
1169 234 265

This is an accepted solution.

I'll send the collaborator request please check and accept 

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required
Jason10
Excursionist
11 0 1

Request accepted. Thank you! 

Huptech-Web
Shopify Partner
1169 234 265

This is an accepted solution.

Hey @Jason10, the changes have been made from my end. I will send a Google Meet invitation to explain how to add the second image and all the other details. Please check your store email.

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required
Jason10
Excursionist
11 0 1

Problem solved! Thank you so much for the help! 🙌

malahf
Shopify Partner
6 0 2

Hello,

Could you please clarify what dynamic code is? I'd like to do the same thing as the OP to my own website (same image but different sizes to accommodate the desktop vs mobile issue). 

Thank you,

Lauren

viki_9501
Visitor
1 0 0

hello,

 

experiencing the same issue. the banner for web is showing for both desktop and web, could you please help?