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.
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025