Title: Adding a Back Button using Block Editor button
Last modified: November 9, 2022

---

# Adding a Back Button using Block Editor button

 *  Resolved [GarrettB](https://wordpress.org/support/users/garrettb/)
 * (@garrettb)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/adding-a-back-button-using-block-editor-button/)
 * Hi
    Is it possible, in the Block Editor, to add one its buttons and make it have
   the same functionality as the browser’s back button? I know this is not always
   recommended, but it will suit the style of p[ages I am creating, where I am offering
   a few navigation options, with nice big buttons, for older users. Usually if 
   I add a button, I would paste in a link to another page etc., or even an anchor
   on the current page, but in this case I want to just go back.
    -  This topic was modified 3 years, 6 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
      Reason: Moved to Fixing WordPress, this is not an Everything else WordPress
      topic

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [George Appiah](https://wordpress.org/support/users/gappiah/)
 * (@gappiah)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/adding-a-back-button-using-block-editor-button/#post-16180795)
 * > Is it possible, in the Block Editor, to add one its buttons and make it have
   > the same functionality as the browser’s back button?
 * This will require JavaScript.
 * Where you’d normally input the destination URL for the button, put the following
   code:
 * `javascript:window.history.back();`
 * Note that the user publishing the page/post must have the `unfiltered_html` capability(
   ie be an **Administrator** or **Editor**)… else the JavaScript code will be stripped
   out by WordPress.
 * ![](https://i0.wp.com/i.snipboard.io/MyZmGW.jpg?ssl=1)
 * Good luck!
 *  Thread Starter [GarrettB](https://wordpress.org/support/users/garrettb/)
 * (@garrettb)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/adding-a-back-button-using-block-editor-button/#post-16181967)
 * George, that worked!
    Thank you so much 🙂
 * Regards
    Garrett

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Adding a Back Button using Block Editor button’ is closed to new replies.

## Tags

 * [button](https://wordpress.org/support/topic-tag/button/)
 * [go back](https://wordpress.org/support/topic-tag/go-back/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [GarrettB](https://wordpress.org/support/users/garrettb/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/adding-a-back-button-using-block-editor-button/#post-16181967)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
