How to code a button that directs user to a specific position on the page?

anelimk
Tourist
7 0 4

 

On my page, I have a section that highlights a customer review and I want the button in the section to redirect the viewer to the product reviews, located at the bottom of the page. Can somebody help me with this? Do I need to add specific code and where would I position it?

Here is the link to the page: https://foodoverdrugs.com/collections/all/products/parasite-cleanse

 

Thank you!

Replies 3 (3)
KetanKumar
Shopify Partner
31362 3131 10502

@anelimk 

yes, let me know where did you add that code?

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
PageFly
Shopify Partner
2371 327 1575

Hi  @anelimk 

This is PageFly - a Free Shopify Landing Page Builder. You can try to add this code to theme.liquid > scolling down to the bottom > add it before </body> to archive that: 
<script>
var button = document.querySelector('#s-2f4478ed-5048-470f-a709-19dcd00558e2')
if(button){
button.href = '#stamped-main-widget'
}
</script>     

Or one more easier way is use scroll to section function of the button from PageFly - a Free Shopify Landing Page Builder. You can totally archive what you designed by a few clicks. 

It would be a good choice for you to have professional sites that look incredible on mobile & desktop without any extra coding, and you will have lots more time focusing on marketing strategies, so you can consider checking PageFly with 24/7 support live chat.

If you feel my answer is helpful, like it or give it a thumb up. Let me know if you have any questions. Cheers!

PageFly- Advanced Shopify Page Builder - Empowering 100.000+ active merchants.


Start Shopify 14 Day Free Trial & Pay $1 For Your First Month


Savior
Shopify Partner
442 93 130

Hey @anelimk 

Yes this is possible but needs to be done by Javascript. Can you tell me on which button click you want to scroll the page to reviews.

If helpful, please Like and Accept Solution.


Hire me or mail me  | Shopify Design Changes | Custom Modifications In to Shopify Theme | Site Speed Optimization
Use GemPages Page Builder to build, design, and optimize your store. View app