Hi guys, is it possible to use the rich text button to go back to previous page? Can this be achieved via liquid for instance?
Site: housedoctor-shop.myshopify.com
pass:soltest
@LitExtension and @MarinaPetrovic You’ve been really helpful thus far. Can you help with this too? 
Thank you so much!
Hi @Tupperton , you can’t do this via liquid, but it’s not that difficult. You should find that element in your code, and make it like this:
Back
I see that you are using ‘Be yours’ theme - unfortunately I don’t have source code of that theme, so I’m not sure where should you include it. Main part of this code is:
javascript:history.back()
You can even make a new element wherever you’d like this button to be displayed.
1 Like
Thank you for your quick reply Marina 
I’ve located the button, it is however in Liquid, can i somehow include the javascript as an asset or function. It doesn’t accept javascript as it is. Here’s the code:
Hi @Tupperton replace this element:
With this:
@Tupperton - be aware that if you change this - this button will always behave the same, you won’t be able to change it through customizer, at least not it’s url. You can add a condition, so this happens only on specific page so you’re able to use this button on other pages regularly. If you’re not sure how to include a condition, just tell me on which page you’d like this button to be the ‘back’ button.
1 Like
Thank you Marina, unfortunately it doesn’t seem to work.
I’ve updated the code as instructed, but the button is not clickable on my product page.
Code now looks like this:
Hi @Tupperton , just tested, change your href with:

1 Like
Thank you again for your quick reply.
Like this right? It’s still not clickable. It seems to just be text on our webpage.
<a class=“button”{% if block.settings.button_link != blank %} href=“javascript: history.go(-1)” {% else %} role=“link” aria-disabled=“true”{% endif %} {{ block.shopify_attributes }}>
{{ block.settings.button_label | escape }}
And this is what it looks like in the theme editor:
Instead of this:
{{ block.settings.button_label | escape }}
Write this:

1 Like
That did the trick! Thank you so much!
1 Like