---
title: Back Button Shortcode Attributes Reference
description: "Every attribute of the [alg_back_button] WordPress shortcode with its default and effect, including button types."
url: "https://wpfactory.com/docs/back-button-shortcode-attributes-reference/"
updated: "2026-10-05"
category: References
---

# Back Button Shortcode Attributes Reference

This page lists every attribute the `[alg_back_button]` shortcode accepts in [Back Button Anywhere Widget for WordPress](https://wpfactory.com/item/back-button-widget-wordpress-plugin/), with its default and effect. The shortcode is free. For step-by-step usage, see the [shortcodes guide](https://wpfactory.com/docs/shortcodes-guide-back-button/).

### [alg_back_button] attributes

| Attribute | Default | Description |
| --- | --- | --- |
| `label` | Back | Button text. Shortcodes inside the label are processed, so you can nest the translate shortcode here. |
| `type` | input | `input` renders `<input type="button">`; `simple` renders a text link; `href` returns the bare `javascript:history.back()` URL for your own link. |
| `class` | Empty | Extra CSS class(es). The plugin also adds `alg_back_button_input` or `alg_back_button_simple` depending on type. |
| `style` | Empty | Inline CSS applied to the button. |
| `js_func` | back | `back` runs `history.back()`; `go` runs `history.go(-1)`. Both go back one page. |
| `fa` | Empty | Font Awesome class. When set, the button renders as a text link containing the icon. |
| `fa_template` | `%icon%` | Where the icon appears. Use `%icon% Back` for icon plus text. |
| `before` | Empty | Text or HTML added before the button. |
| `after` | Empty | Text or HTML added after the button. |
| `lang` | Empty | Language code(s). With `not_lang_text`, swaps the label when the active language is not listed. |
| `not_lang_text` | Empty | Label shown when the active language is not in `lang`. |
| `hide_on_front_page` | no | Hides the button on the front page. Takes effect on Pro only. |
| `hide_on_url_param` / `hide_on_url_param_value` | Empty | Hides the button when the named query parameter equals the given value. Pro only. |
| `show_on_url_param` / `show_on_url_param_value` | Empty | Shows the button only when the named query parameter equals the given value. Pro only. |

### Notes on button types

- **input:** a form button that calls `window.history.back()` on click, carrying the `alg_back_button_input` class.
- **simple:** a link (`<a>`) with the `alg_back_button_simple` class and an `href` of `javascript:history.back()`.
- **href:** returns only the string `javascript:history.back()`, so you can drop it into the `href` of your own markup.

### Empty output

If a hide/show rule (Pro) resolves to "hide", the shortcode returns an empty string, and the `before` and `after` text are not printed either.

### Related

See [How to translate the back button](https://wpfactory.com/docs/translate-the-back-button/) for the `[alg_back_button_translate]` shortcode, and the developer reference for the `alg_back_button()` PHP function and available filters.

Related articles

- [Back Button Widget Settings Reference](https://wpfactory.com/docs/back-button-widget-settings-reference/)
- [How to Add a Font Awesome Icon to the Back Button](https://wpfactory.com/docs/add-font-awesome-icon-to-back-button/)
- [How to Add a Floating Back Button](https://wpfactory.com/docs/add-floating-back-button/)
- [How to Add the Back Button to a WordPress Menu](https://wpfactory.com/docs/add-back-button-to-wordpress-menu/)
- [How to Hide or Show the Back Button by Page or URL](https://wpfactory.com/docs/hide-or-show-back-button-by-url-or-page/)
