Table of Contents
This page lists every attribute the [alg_back_button] shortcode accepts in Back Button Anywhere Widget for WordPress, with its default and effect. The shortcode is free. For step-by-step usage, see the shortcodes guide.
[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 thealg_back_button_inputclass. - simple: a link (
<a>) with thealg_back_button_simpleclass and anhrefofjavascript:history.back(). - href: returns only the string
javascript:history.back(), so you can drop it into thehrefof 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 for the [alg_back_button_translate] shortcode, and the developer reference for the alg_back_button() PHP function and available filters.