Unlock Your Shopify Mobile Carousel: Fixes for Custom Theme Overrides

Hey everyone, your friendly Shopify expert here, diving into a common head-scratcher that popped up recently in the community. Our fellow store owner, kkayleighh, reached out with a classic mobile product carousel dilemma. She wanted to display three products side-by-side in a swipeable carousel on her mobile site, junojane.co, but her existing custom changes were causing some headaches with the default Shopify feature. Sound familiar? You're definitely not alone!

This is a super common issue, especially when you've tweaked your theme over time. Luckily, the community jumped in with some fantastic insights, and we've got a clear path to get your mobile carousels spinning smoothly.

The Root of the Mobile Carousel Mystery

Several experts, like Wsp and tim_1, quickly pinpointed the most frequent culprits behind a broken mobile carousel. It often boils down to a couple of key things:

  • Duplicate Product Sections: Many stores end up with separate product sections – one intended for desktop and another specifically for mobile. While this might seem logical, it often leads to conflicts, especially when one is hidden or incorrectly configured.
  • Conflicting Custom CSS: If you've added custom CSS for layout or styling, it can easily override Shopify's native slider behavior. This might hide a section, force a grid layout, or prevent items from scrolling correctly.
  • Incorrect Theme Settings: Sometimes, it's as simple as the "carousel" or "slider" option being unchecked in your theme editor, or the layout being set to "grid" instead of "slider."

As gracetech1 wisely noted, often the issue isn't with the slider logic itself, but with the product-card wrapper or its parent containers – basically, how the individual product items are being told to behave within their overall section.

Your Step-by-Step Fix: Back to Basics First!

Before we jump into any code, let's tackle the structural and theme settings first. This is usually the cleanest and most effective solution.

Step 0: Always Make a Theme Copy!

This is non-negotiable. As tim_1 stressed, always duplicate your live theme (Online Store > Themes > Actions > Duplicate) before making any code changes. This way, if something goes wrong, your live store remains untouched.

Step 1: Consolidate Your Product Sections

This was a big one that Wsp and tim_1 highlighted. You likely have two sections, one for desktop and one for mobile, potentially with conflicting settings or hidden visibility. The goal is to have one responsive section that adapts for both desktop and mobile.

  • Go to your Theme Editor (Online Store > Themes > Customize).
  • Navigate to the page where your product carousel should be.
  • Look for your product sections. If you see two very similar sections for products, one might be configured for mobile and the other for desktop.
  • Hide or Delete the Redundant Section: As tim_1 suggested, if one section is specifically for mobile and isn't correctly set up, either hide it (click the eye icon in the theme editor) or delete it entirely. Focus on the section you want to be primary and responsive.

Tim_1 even shared a screenshot of what duplicate sections can look like:

Step 2: Configure Your Primary Section Settings

Now, let's make sure your chosen section is telling Shopify to behave like a carousel on mobile.

  • In the Theme Editor, select your primary product section.
  • Look for settings related to "Slider", "Carousel", or "Mobile layout".
  • Turn ON slider/carousel: Ensure this option is checked.
  • Enable swipe on mobile: If available, make sure this is active.
  • Set layout to slider (not grid): This is crucial for mobile. For desktop, you might still want a grid, but ensure the mobile setting is for a slider. For kkayleighh's goal of three products, tim_1 suggested setting the desktop section to 2 columns and checking "Carousel" under "Mobile layout".

Step 3: Clean Up Conflicting Custom CSS

This is where custom changes often wreak havoc. You need to remove any CSS that might be hiding your section on mobile or forcing a grid.

  • Still in the Theme Editor, select your primary product section.
  • Scroll down to the "Custom CSS" box for that specific section.
  • Look for code like this (as tim_1 found in kkayleighh's store) and remove it:
  • @media screen and (max-width: 750px) {
      .collection {
        display: none;
      }
    }
  • Instead of hiding, tim_1 suggested adding this override CSS to the same "Custom CSS" box to ensure proper wrapping and slider button display:
  • .grid.product-grid {
        flex-wrap: nowrap !important;
      }
    .slider-buttons {
      display:flex !important;
    }
    

After these steps, check your mobile site. You might already see an improvement!

Here's what a working mobile carousel can look like:

Fallback & Fine-Tuning: Custom CSS for Mobile Carousel

If the above steps don't fully resolve the issue, or if you need to specifically force a certain layout (like three products in a row), custom CSS is your powerful fallback. Both Wsp, mastroke, and emilyjhonsan98 provided excellent snippets.

You'll want to add this to your theme's base.css file. This ensures it applies globally and can override other styles.

How to Add the Custom CSS:

  1. From your Shopify admin, go to Online Store > Themes>.
  2. Find your duplicated theme (the one you made a copy of earlier) and click Actions > Edit Code.
  3. In the Assets folder, find base.css (or theme.css, custom.css, depending on your theme, but base.css is a common spot).
  4. Scroll to the very bottom of the file and paste this code:
@media screen and (max-width: 749px) {
  .product-grid {
    display: flex !important;
    flex-wrap: nowrap !important; /* Important for preventing items from wrapping */
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; /* For smooth iOS scrolling */
    gap: 12px; /* Adjust spacing between products */
    padding-bottom: 10px; /* Gives a little breathing room below */
  }

  .product-grid::-webkit-scrollbar {
    display: none; /* Hides the scrollbar on Webkit browsers */
  }

  .product-grid .product-card-wrapper, /* Target the wrapper for better compatibility */
  .product-card {
    flex: 0 0 calc(33.333% - 12px); /* Forces three products in a row, adjusting for gap */
    scroll-snap-align: start;
  }

  /* If you still see default slider buttons, this might help */
  .slider-buttons {
    display: flex !important;
  }
}

A quick note on the flex: 0 0 calc(33.333% - 12px); line: This is what forces three products to appear in one row on mobile, as kkayleighh wanted. The - 12px part accounts for the gap we set. Emilyjhonsan98 also highlighted the 33.3% width for this specific goal. Just remember, as she warned, making products this small can sometimes make them look a bit crowded, so test it thoroughly!

Final Thoughts and Best Practices

This discussion really underscores how intricate theme customization can be. When you're dealing with a mobile carousel that's not cooperating, always start with the theme editor settings and section consolidation. Only then, if needed, move to custom CSS. It's a more robust approach that leverages Shopify's built-in features.

Gracetech1's point about inspecting the parent container (product-card wrapper) is super valuable. Sometimes, the issue isn't the carousel itself, but how its parent elements are constrained. Using your browser's developer tools to inspect elements on mobile can give you huge clues!

Ultimately, a smooth, functional mobile experience is non-negotiable for any successful Shopify store. By following these steps – and learning from the collective wisdom of the community – you'll be well on your way to a beautifully scrolling product carousel!

Share:

Use cases

Explore use cases

Agencies, store owners, enterprise — find the migration path that fits.

Explore use cases