Liquid, JavaScript, themes, sales channels
Hello,
The button links on this page: https://limitlessloveclothing.com/pages/about-alexs-lemonade-stand-foundation
of my shopify store are not working. I can't figure out what I'm doing wrong. From the theme editor, I can visit the links but when publish, the links do not navigate to the url at all.
Thanks,
Brian
This is Noah from PageFly - Shopify Page Builder App
Please add this code to your theme.liquid above the </head> to get this solved
Step 1: Online Stores > Themes > More Actions > Edit code
Step 2: click on theme.liquid and paste the code above the </head>
<script>
const pfInterval = setInterval(()=>{
const btns = document.querySelectorAll('.block_btn.btn')
if (btns) {
clearInterval(pfInterval)
btns.forEach(btn => {
let href = btn.getAttribute('href')
btn.addEventListener('click', () => {
window.location = href;
})
})
}
},100)
setTimeout(() => {
clearInterval(pfInterval)
},15000)
</script>
Hope this can help you solve the issue
Best regards,
Noah | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
PageFly - #1 Page Builder for Shopify merchants.
All features are available from Free plan. Live Chat Support is available 24/7.
Hi @limitlesslarsen I checked again, with this code the button is now functioning. It is open the new tab when i click on it
Let me know if this working properly on your end
Please let me know if it works by giving it a Like or marking it as a solution!
PageFly - #1 Page Builder for Shopify merchants.
All features are available from Free plan. Live Chat Support is available 24/7.
User | RANK |
---|---|
38 | |
29 | |
13 | |
12 | |
9 |
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023