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
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:
footer.liquid file in Sections foldertheme.scss.liquidClarification Needed:
User asked where exactly to place the code in a 565-line footer file.
Refined Approach:
custom_map.liquid snippet file containing the map code{% section 'footer' %} in theme.liquid{% render 'custom_map' %} above the footer sectionCurrent 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.
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 :
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>
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 -->
Add custom CSS to adjust the map’s size and styling. To do this:
CSS
.footer-google-map iframe { width: 100%; height: 300px; /* Adjust the height as necessary */ border: none; }
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 :
Create snippets a file like custom_map.liquid file and put the map code.
Go to theme.liquid file and find such a name section ‘footer’.
{% section 'footer' %}
This is responsible for the footer code.
{% render 'custom_map' %}
I hope these steps will help you.
Thanks
Vitix Dev Team