• Hi Guys

    I am trying to add back button/link to a page currently I am trying to use this code.

    <input type=”button” value=”Previous Page” onclick=”goBack()”>

    <script>
    function goBack() {
    window.history.back()
    }
    </script>

    but I am having many problems. Lets for the moment assume that I can get the javascript working. When I put the input on the page wordpress strips the onclick event or the href so the code does not run.

    Is there a way to get the above to work?

    or

    Is there a wordpress way to have a button/link that when clicked returns to the previous page?

The topic ‘button-link’ is closed to new replies.