Custom Liquid Shopify (how to add a custom section to your store in 6 steps)
Instant Team
Custom Liquid Shopify (how to add a custom section to your store in 6 steps)
Customizing your Shopify store can feel like solving a puzzle. Each piece has a role to play, and if you're missing a few or they don't fit, the picture is incomplete, and your conversion rate will suffer. Custom Liquid Shopify allows you to create tailored solutions to fill the gaps and make your store operate exactly how you want. This article will show you how to start with Liquid code to boost your Shopify conversion rate optimization.
Instant's Shopify landing page builder is a valuable tool for achieving objectives such as learning how to customize Shopify using Liquid code. With it, you can create custom landing pages to optimize for conversions and provide a better user experience.
Table of Contents
Shopify custom Liquid section vs Shopify custom HTML section
What is the difference between a Shopify section and a block?
Are there any limitations to using custom Liquid sections & blocks?
What is a custom Liquid on Shopify?
A Shopify custom Liquid section is a flexible tool for injecting custom code into your store's theme. It allows you to add tailored content and functionality beyond the default Shopify features. This section is handy for creating unique layouts or integrating third-party apps that require specific customization.
Using custom Liquid, you can embed HTML, CSS, and Liquid (Shopify's templating language), creating highly customized sections like:
Dynamic banners
Product showcases
Personalized content
It's perfect for store owners or developers who want to modify their site’s design or functionality to better reflect their brand or customer needs. Whether adding a special promotion, customizing product layouts, or integrating new app features, custom Liquid sections give you the freedom to shape your store as you like.
How does custom Liquid Shopify work?
Liquid is Shopify’s programming language. Shopify uses a template language to allow users to change their store and create outputs. It’s used with Ruby and is available on the open-source GitHub platform for anyone curious.
Shopify CEO Tobias Lütke first developed the language. It allows data to be displayed on Shopify in a template, enabling people to change their store and enjoy Shopify themes. Initially meant for just Shopify, it is now used in many other content management systems and site generators.
What makes Liquid Shopify different?
Is Liquid a programming language or a template? Liquid is often called a template, template language, template builder, or template engine. It can be confusing to establish what exactly liquid is.
Liquid works like a programming language. It has syntax, the rules that determine what the language symbols mean, just like other programming languages. Liquid runs on three main components:
Object
Tag
Filter
Understanding objects in Liquid Shopify
Objects represent all the data defined by the admin, including:
Product names
Availability
Coupon codes and more
How tags work in Liquid Shopify
Unlike objects, which create visible outputs on your store, tags create conditions for outputs. For example, tags will display sold-out messages when consumers have bought all your products.
Using filters to work smarter, not harder
Filters help manipulate output data, allow agnostic themes, and save time when a Shopify developer codes a new feature. It’s a compelling part of Liquid and is used with Liquid’s output. Liquid also has other concepts readily found in programming, like logic.
Related Reading
What do you use the custom Liquid section for?
Custom Liquid sections help you create visually appealing, brand-specific designs that align with your identity. You can tailor the look and feel of your store to make it instantly recognizable to customers. This consistency in branding fosters trust and loyalty.
Improve user experience with custom Liquid sections on Shopify
With custom sections, you have the flexibility to design page layouts that optimize the user experience. You can strategically place content like product listings or navigational elements to create a seamless and intuitive shopping journey. An improved user experience leads to higher customer satisfaction and conversions.
Versatile Liquid sections help with multiple customization goals
Custom Liquid sections are versatile components that can serve multiple purposes. They can:
Showcase products
Highlight customer reviews
Display promotional banners
Feature special offers
This versatility allows you to adapt your store to changing marketing strategies and seasonal campaigns.
Increase conversions with custom Liquid sections on Shopify
You can boost conversion rates by customizing sections to emphasize specific calls-to-action (CTAs), such as:
Add to cart buttons
Newsletter sign-up forms
Customized sections make it easier for customers to take the desired actions, ultimately increasing sales and engagement.
SEO optimization with custom Liquid sections on Shopify
Custom sections enable you to structure content and meta-information with SEO best practices. This optimization enhances your store's visibility on search engines, improving rankings and organic traffic. Effective SEO is essential for attracting potential customers and growing your online presence.
Effortless Shopify page customization with Instant’s drag-and-drop builder
Instant is a user-friendly Shopify landing page builder that allows eCommerce teams and agencies to create fully customizable and advanced pages without any coding knowledge. With its intuitive drag-and-drop interface, users can quickly design and publish:
High-converting landing pages
Product detail pages
Sections
Instant also offers seamless integration with Figma and other eCommerce tools, making it a versatile choice for enhancing online store performance and increasing conversions.
Try Instant's Shopify landing page builder today!
How to add a custom Liquid section in Shopify in 6 steps
Adding a custom Liquid section in Shopify is a great way to enhance your store's functionality and add advanced customizations. Here’s how you can create and integrate a custom Liquid section step-by-step:
1. Access theme code
In your Shopify admin panel, navigate to Themes under the Online Store section. Next to the theme you're working on, click the Actions dropdown menu and select Edit Code.
2. Create a new section
Inside the code editor, locate the Sections directory. Then, click Add a New Section and name it custom-liquid-section to identify it easily. Once named, hit Create to generate the file.
3. Add custom Liquid code
After creating the section, you’ll need to add the following Liquid code to define the section’s functionality: ```liquid
{{ section.settings.custom_liquid }}
{% schema %}
{
"name": "Custom Liquid",
"settings": [
{
"type": "liquid",
"id": "custom_liquid",
"label": "Custom Liquid",
"info": "Add app snippets or other liquid code to create advanced customizations."
}
],
"presets": [
{
"name": "Custom Liquid"
}
]
}
{% endschema %}
```
This code sets up a section with an input field for Liquid code, making it easy to customize content from the theme editor.
4. Add the section to your page
Head to your theme editor, select the page where you want to insert the custom section, click Add Section, and scroll to find the newly created "Custom Liquid" section. Once selected, it will be added to your page layout.
5. Customize your Liquid section
The newly created Liquid section allows you to add your custom code, including:
HTML
CSS
Liquid tags
This is where you define how the section will appear and function in your store.
6. Save & publish
Once you're happy with your customization, hit the Save button to apply the changes and publish the new Liquid section live on your site.
Following these steps, you can add dynamic content or app integrations using Shopify's powerful Liquid language. Tools like Instant's Shopify landing page builder can offer an easier route for users who want advanced customization without diving too deep into coding.
Related Reading
Shopify custom Liquid section vs Shopify custom HTML section
Custom Liquid Shopify sections are built using Shopify’s Liquid templating language. This means they have direct access to Shopify’s data, such as:
Product information
Collections
Customer details
Liquid sections are user-friendly, allowing store owners to customize them without deep coding knowledge. You can easily modify things like product displays or featured sections, and they’re designed to integrate smoothly with Shopify’s backend.
Custom HTML sections and Shopify’s data: What’s the connection?
Custom HTML Shopify sections, on the other hand, are focused on raw code:
HTML
CSS
JavaScript
These sections give you more freedom in design and layout but don’t have the same level of access to Shopify’s data without manual coding. You’ll need more technical expertise to handle HTML sections, and they don’t offer the same drag-and-drop simplicity or data integration that Liquid sections provide.
What is the difference between a Shopify section and a block?
In Shopify, sections and blocks are essential to customizing your store’s layout, but they serve slightly different purposes.
Sections
Sections are like the big building blocks of your store’s pages. They usually take up the full width of the page and help define the structure of the page. Think of them as the main pieces of your page layout, things like:
Hero banners
Product grids
Testimonials
You can add, remove, or move sections around to create the overall design of your page.
Blocks
Blocks fit inside these sections. They’re smaller content units that allow you to fine-tune what's displayed within each section. For example, if you have a section for testimonials, the blocks within that section might be individual customer quotes or photos. You can:
Add
Remove
Rearrange blocks
But they stay within the section they're a part of.
Each Shopify theme pre-designs sections and blocks, so what you can add or customize will depend on your theme.
Are there any limitations to using custom Liquid sections & blocks?
Custom Liquid sections in Shopify are a powerful way to add flexibility to your store, but they have a few limitations to remember.
Not all themes support custom Liquid sections
Not all themes support custom Liquid sections, so if you want to take advantage of this feature, you'll need to ensure you're using one that does. You might not have access to the same customization options.
Design consistency can be a challenge
Design consistency can be a challenge when creating custom sections. It’s easy to get carried away with customization, but maintaining a cohesive look throughout your store is important to keeping the user experience smooth and professional.
Extensive customization might require coding expertise
Extensive customization might require coding expertise. While Shopify’s Liquid language gives you a lot of freedom, it’s still coding-based, so having some technical know-how (or a developer on hand) can be helpful if you're trying to implement complex features. You could run into issues trying to get things to work exactly how you want.
Related Reading
Shopify Web
Shopify Customization
Custom Shopify Themes
Free Ecommerce Templates
Optimize your Shopify store for conversions without breaking the bank with Instant's Shopify landing page builder
Instant is a user-friendly Shopify landing page builder that allows eCommerce teams and agencies to create fully customizable and advanced pages without any coding knowledge. With its intuitive drag-and-drop interface, users can quickly design and publish:
High-converting landing pages
Product detail pages
Sections
Instant also offers seamless integration with Figma and other eCommerce tools, making it a versatile choice for enhancing online store performance and increasing conversions.
Try Instant's Shopify landing page builder today!
Weekly Shopify tips from our founder in your inbox. Read in 3-mins or less. Start converting like an eCommerce expert.