Often, the client wants to add a back button in Elementor because the back button can be a handy feature for the users to go back to the last screen easily. It is also good for the user experience. So let’s add a back button in Elementor step by step.
Add Back Button
- Drag & Drop the
Button widgetonto your page, wherever you’d like to place it - Go to the Button widget’s
Advanced tab, enter a name into theCSS IDfield, such as'btn-back'as shown in the following screenshot
Drag & Drop Button Widget Add CSS ID
- Don’t forget to click on the “Update” button
- Now, add the following code into your JavaScript file. If you don’t know how to place the JavaScript code in your WordPress then follow step 5 & 6 else skip that. The developer knows how to place code but what if you are not a technical person. That’s why I will show you how you can place your JavaScript or CSS code in WordPress.
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('#btn-back').on('click', function() {
window.history.go(-1);
return false;
});
});
</script>
- To place JavaScript code in WordPress, you need to install and activate the Insert Reply


