- Published on
Unlocking More Shopify Collection Blocks A Joyful Guide
- Authors
- Name
- Entaice Braintrust
Unlocking More Shopify Collection Blocks: A Joyful Guide
In the sleepy back alleys of suburbia, where the cats eye you with the intensity of a thousand suns, there once lay an unassuming e-commerce shop in my friend Margo’s cluttered garage. Margo was a woman of passion, especially when it came to creating an empire of frilly scarves and eccentric trinkets. But one day, amidst the chaos of chintz and lace, she found that her Shopify site needed more collection blocks. This set off the great quest - and here we are.
When it comes to Shopify, we want our digital shops to look as fabulous as a high-end boutique, right? More collection blocks mean more ways to display our treasures. So, let’s dive into this labyrinth of lines and squiggles – because really, it's just code, not the freaking Da Vinci Code.
Remembering the Code... Or Not?
Margo sat there reminiscing about that time she figured out how to add more collection blocks, with the same nostalgia we reserve for forgotten pop tunes of the '90s. So here’s the scoop: time to get your hands dirty with a mix of liquid, CSS, and Shopify's dawn chorus—liquid files.
Step 1: Open That Theme Editor
First, we need to hop right into the Theme Editor. You can get there from your Shopify admin—Olympian-level navigation skills not required. Simply romp over to "Online Store" from your admin, then "Themes." Click "Actions" next to the theme you're using, then "Edit Code."
Step 2: Befriend Your Snippets
We’re looking for the snippets
folder which conceals the collection-template.liquid
or collection-list.liquid
files. If that sounds like finding a needle in a haystack, don't worry. Take a deep breath. Click in there and have a browse—it’s in the snippets
folder, we promise.
Here’s the crux: if you need more blocks, we tweak things within these liquid files—and this is where Margo had used her wizardry long ago, apparently.
Step 3: Editing for More Blocks
Get ready, because here’s where we do a bit of magic. Within your chosen .liquid
file (like a treasure map), you'll search for the block of code that dictates how many collections appear. Typically, this looks like a line concerning limits, such as limit: 20
.
Margo found her old notes, leftover from last year’s escapades, and realized she just bumped up this limit to her heart’s content. So let's do that now. Change this number to a higher value, like 50 or 60, to unleash the block abundance.
{% paginate collection.products by 60 %}
Custom CSS to the Rescue!
Remember how we talked about cats eyeing you suspiciously? Well, to make them watch in awe, we might need some custom CSS for styling our new bounty of blocks.
Step 4: Wander to the CSS File
Open the theme.scss.liquid
file located in the assets
folder. Gosh, I have to tell you, music played in Margo's heart whenever she opened this file. Here, add your custom styles to ensure that those new collection blocks look sleek and chic.
For instance, if you’re adjusting the grid display to accommodate swoon-worthy symmetry:
.collection-block {
width: calc(100% / 5);
margin: 10px;
}
Adjust these properties based on your grand vision—a little trial and error, much like baking bread during lockdowns.
Testing and Toasts
Finally, after our tech-tango with code and configuration, it’s time for a recital. Head back to your store’s front-end and refresh it. Take a look around and make sure everything looks like it was woven by magical elves in their off-hours.
And there it is, our journey—a romp from Margo’s tinkering memories to tweaking CSS files—to unlock an entire world of collection blocks, allowing us to curate our stores with the kind of finesse only matched by the pruning of one’s bonsai collection.
Reliving the Adventure
Back at Margo’s ramshackle of cat-eye worthy scarves, we toasted our digital derring-do with a cup of tea and the victory song of “We Are the Champions” blazing in the background. Solving this puzzle not only tidied up our digital boutiques but also planted the seed of persistent curiosity—a reminder that even in the tangled web of code and commerce, there lies discoverable wonders.
So much like Margo—who now remembers this tiny victory each time the whistle of a kettle sounds—may we all revel in the small triumphs that code brings. And may we always have plenty of collection blocks, adorned with love, ready for the world to see.