Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
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.
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024