Shopify themes, liquid, logos, and UX
Hello, can anyone help me please? Im looking to change the arrows on my page and unsure how.
url: https://errival.com/products/test
From this:
To this:
Solved! Go to the solution
This is an accepted solution.
Hi @Ryan1998
Follow these Steps:
1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code just above tag </body>
<style>
.accordion .summary__title+.icon-caret {
height: 10px;
}
summary .icon-caret {
height: 10px;
top: unset;
}
</style>
<script>
document.addEventListener('DOMContentLoaded', function() {
document.querySelectorAll('.product__accordion svg.icon-caret, .header__menu-item svg.icon-caret').forEach(svg => {
const newSvg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
newSvg.setHeight= "10px";
newSvg.setAttribute("xmlns", "http://www.w3.org/2000/svg");
newSvg.setAttribute("fill", "#000000");
newSvg.setAttribute("viewBox", "0 0 512 512");
newSvg.setAttribute("class", "icon icon-caret");
const title = document.createElementNS("http://www.w3.org/2000/svg", "title");
title.textContent = "ionicons-v5-b";
newSvg.appendChild(title);
const polygon = document.createElementNS("http://www.w3.org/2000/svg", "polygon");
polygon.setAttribute("points", "64 144 256 368 448 144 64 144");
newSvg.appendChild(polygon);
svg.replaceWith(newSvg);
});
});
</script>
If you require further help to optimize your store, please don’t hesitate to reach out. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!
Best Regards,
Makka
This is an accepted solution.
Hi @Ryan1998
Follow these Steps:
1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code just above tag </body>
<style>
.accordion .summary__title+.icon-caret {
height: 10px;
}
summary .icon-caret {
height: 10px;
top: unset;
}
</style>
<script>
document.addEventListener('DOMContentLoaded', function() {
document.querySelectorAll('.product__accordion svg.icon-caret, .header__menu-item svg.icon-caret').forEach(svg => {
const newSvg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
newSvg.setHeight= "10px";
newSvg.setAttribute("xmlns", "http://www.w3.org/2000/svg");
newSvg.setAttribute("fill", "#000000");
newSvg.setAttribute("viewBox", "0 0 512 512");
newSvg.setAttribute("class", "icon icon-caret");
const title = document.createElementNS("http://www.w3.org/2000/svg", "title");
title.textContent = "ionicons-v5-b";
newSvg.appendChild(title);
const polygon = document.createElementNS("http://www.w3.org/2000/svg", "polygon");
polygon.setAttribute("points", "64 144 256 368 448 144 64 144");
newSvg.appendChild(polygon);
svg.replaceWith(newSvg);
});
});
</script>
If you require further help to optimize your store, please don’t hesitate to reach out. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!
Best Regards,
Makka
👌
We want to take a moment to celebrate the incredible ways you all engage with the Shopi...
By JasonH Oct 15, 2024Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024