Custom liquid option in footer

Topic summary

A user seeks to embed a Google Map in their Shopify theme footer using custom Liquid code, specifically wanting it available as a block option in the theme customizer.

Initial Solution Provided:

  • Get Google Maps iframe embed code
  • Add code directly to footer.liquid file in Sections folder
  • Optionally style with custom CSS in theme.scss.liquid

Clarification Needed:
User asked where exactly to place the code in a 565-line footer file.

Refined Approach:

  • Create a custom_map.liquid snippet file containing the map code
  • Locate {% section 'footer' %} in theme.liquid
  • Render the snippet using {% render 'custom_map' %} above the footer section

Current Status:
The user clarified they want the map as a customizable block option within the footer section (accessible through the theme editor), not hardcoded. The discussion remains open as the solution provided doesn’t fully address adding it as an editable block in the customizer interface.

Summarized with AI on November 3. AI used: claude-sonnet-4-5-20250929.

Hi,

There is a way to add a custom liquid to footer? I wish to embed google maps.

Thanks for help in advance,

Regards,

Adrian

Hi adkowaty,

You need to follow the below steps :

Step 1: Get Your Google Maps Embed Code1. Go to Google Maps and find the location you want to embed.

  1. Click the Share button (it looks like a chain link).
  2. Select Embed a map.
  3. Choose the size and customize the map view if necessary.
  4. Copy the iframe embed code that Google provides.

For example, it may look like this:

<iframe src="[https://www.google.com/maps/embed?pb=](https://www.google.com/maps/embed?pb=)..." width="600" height="450" style="border:0;" allowfullscreen="" loading="lazy"></iframe>

Step 2: Add the Code to the Footer1. Go to your Shopify admin panel.

  1. Navigate to Online Store > Themes.
  2. Select your current theme and click on Actions > Edit code.
  3. In the left-hand sidebar, find the Sections folder and open the footer.liquid file. This is where you can add custom content to your footer.
  4. Paste the Google Maps iframe code inside the file. You can place it where you want it to appear in the footer. Typically, this would be within a div or just at the end of the footer content.

Example:

<!-- Your other footer content --> <div class="footer-google-map"> <iframe src="[https://www.google.com/maps/embed?pb=](https://www.google.com/maps/embed?pb=)..." width="600" height="450" style="border:0;" allowfullscreen="" loading="lazy"></iframe> </div> <!-- More footer content -->

Step 3: Style the Map (Optional)

Add custom CSS to adjust the map’s size and styling. To do this:

  1. Go to Assets > theme.scss.liquid (or whatever your theme’s main CSS file is named).
  2. Add custom styles for your map. For example:

CSS

.footer-google-map iframe { width: 100%; height: 300px; /* Adjust the height as necessary */ border: none; }

Step 4: Save Your Changes- Once you’re happy with the placement and styling, save the changes to both the footer.liquid and theme.scss.liquid files.

Step 5: Test the Changes- Visit your Shopify store and scroll to the footer to see the embedded Google Map.

This will help you.

Thanks

Vitix Dev Team

Hello,

Thanks for your response. File have 565 lines, where should i put the code?

Thanks for your time and help in advance,

Regards,

Adrian

Hi @adkowaty ,

In the standard of the theme structure :

  1. Create snippets a file like custom_map.liquid file and put the map code.

  2. Go to theme.liquid file and find such a name section ‘footer’.

{% section 'footer' %}

This is responsible for the footer code.

  1. If you want to show above the footer, add the file custom_map.liquid by render ‘custom_map.liquid’.
{% render 'custom_map' %}

I hope these steps will help you.

Thanks

Vitix Dev Team

Hi Vitix_Dev,

Thanks again for your time and help. What I’m looking for is to have option to add a custom liquid as a block in footer.

Thanks in advance,

Regards,

Adrian