Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
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=..." 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=..." 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:
.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 :
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.
3. 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