---
title: Getting Started with Back Button Widget
description: Add a Back button to any WordPress site with the Back Button widget, shortcode or PHP function, plus Pro menu and floating buttons.
url: "https://wpfactory.com/docs/using-back-button-widget/"
updated: "2026-09-27"
category: How to
tags:
  - Back Button Widget for WordPress
---

# Getting Started with Back Button Widget

[Back Button Anywhere Widget for WordPress](https://wpfactory.com/item/back-button-widget-wordpress-plugin/) adds a one-click "Back" button to any WordPress site through a widget, a shortcode or a PHP function, and in Pro through a menu item or a floating button. Its settings page is at **WPFactory > Back Button**, and the widget itself is under **Appearance > Widgets**.

## What it does

Back Button Widget outputs a button or text link that sends the visitor to the previous page in their browser history. It works on any WordPress site and does not need WooCommerce or a page builder.

## Install and activate

1. Free: go to **Plugins > Add New**, search for **Back Button Widget** by WPFactory, click **Install Now**, then **Activate**.
2. Pro: download **Back Button Widget Pro** from your WPFactory account, go to **Plugins > Add New > Upload Plugin**, upload the ZIP and activate it.
3. You can leave the free plugin installed. When Pro is active, the free copy stops loading on its own, so the two never run together.

For more detail, see [Installing the Back Button Widget plugin](https://wpfactory.com/docs/installing-back-button-widget/).

## First setup

The fastest working result is the widget or the shortcode. Both are free.

1. Go to **Appearance > Widgets** and add the **Back Button** widget to a sidebar, footer or any widget area.
2. Set **Button label** (default: Back) and, if you want a plain link instead of a button, set **Button type** to **Simple text** (default: Button).
3. Save the widget and open a page on your site from another page to test it.
4. To place the button inside content instead, add `[alg_back_button]` to a post or page, or `[alg_back_button label="Go back"]` for a custom label. In a theme template, use `echo alg_back_button( 'Back' );`.

### Widget fields

| Field | Instance key | Default | Free/Pro |
| --- | --- | --- | --- |
| Title | `title` | Empty | Free |
| Before button | `before_button` | Empty | Free |
| After button | `after_button` | Empty | Free |
| Button label | `button_label` | Back | Free |
| Button HTML class | `button_class` | Empty | Free |
| Button HTML style | `button_style` | Empty | Free |
| Button type | `button_type` | Button | Free |
| Button JS function | `button_js_func` | back | Free |
| Hide on front page | `hide_on_front_page` | No | Pro |
| Hide on URL param / value | `hide_on_url_param` | Empty | Pro |

**Button type** chooses how the button is rendered: **Button** outputs an `<input type="button">`, and **Simple text** outputs a plain text link. **Button JS function** chooses the browser call: `back` runs `history.back()` and `go(-1)` runs `history.go(-1)`; both return to the previous page. All widget options are covered in the [Back Button Widget settings reference](https://wpfactory.com/docs/back-button-widget-settings-reference/).

## Main features

### Shortcode and attributes (Free)

`[alg_back_button]` accepts the widget settings as attributes, such as `label`, `class`, `style`, `type` and `js_func`, plus `before` and `after`. See the [shortcode attributes reference](https://wpfactory.com/docs/back-button-shortcode-attributes-reference/) and the [shortcodes guide](https://wpfactory.com/docs/shortcodes-guide-back-button/).

### Font Awesome icon (Free)

Add an icon with the `fa` attribute, for example `[alg_back_button fa="fas fa-angle-double-left"]`. If your theme does not load Font Awesome, turn on **Load** in the **Font Awesome** section of the settings page. See [how to add a Font Awesome icon to the back button](https://wpfactory.com/docs/add-font-awesome-icon-to-back-button/).

### Translated labels (Free)

The `lang` and `not_lang_text` attributes and the `[alg_back_button_translate]` shortcode show a different label per language. They read the WPML language code (`ICL_LANGUAGE_CODE`), which Polylang also provides. See [how to translate the back button](https://wpfactory.com/docs/translate-the-back-button/).

### Menu button (Pro)

In **Menu Options**, set **Enable section** to Yes and pick **Menu location(s)** or **Menu(s)**. The button is added as the last item. See [how to add the back button to a WordPress menu](https://wpfactory.com/docs/add-back-button-to-wordpress-menu/).

### Floating button (Pro)

In **Floating Button Options**, set **Enable section** to Yes and choose a **Position** (Bottom right, Bottom left, Top right or Top left) and margins. See [how to add a floating back button](https://wpfactory.com/docs/add-floating-back-button/).

### Hide or show rules (Pro)

Hide the button on the front page, or hide or show it based on a URL parameter, from the widget or with shortcode attributes such as `hide_on_front_page` and `show_on_url_param`. See [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/).

## Free vs Pro

| Feature | Free | Pro |
| --- | --- | --- |
| Back Button widget (label, class, style, type, JS function) | Yes | Yes |
| `[alg_back_button]`, `[alg_back_button_translate]` and `alg_back_button()` | Yes | Yes |
| Font Awesome icon and loader | Yes | Yes |
| Menu Options (button in a menu) | No | Yes |
| Floating Button Options | No | Yes |
| Hide on front page, hide or show by URL parameter | No | Yes |

For a longer comparison, see [Back Button Widget: Free vs Pro](https://wpfactory.com/docs/pro-vs-free-versions-back/).

## FAQ

### Where are the settings?

At **WPFactory > Back Button** (page title "Back Button Settings"), with sections for Widget, Shortcode, Menu Options, Floating Button Options and Font Awesome. The widget's own fields are edited in **Appearance > Widgets**.

### Why does the button do nothing on some pages?

The button repeats the browser's back action, so it only works when there is a previous page in the visitor's history. Someone who lands directly on the page from an external link or a new tab has nothing to go back to. For a fixed destination, use a normal link. See [back button navigation behavior](https://wpfactory.com/docs/back-button-navigation-behavior/).

### Does it need WooCommerce?

No. It is a WordPress plugin and works on any site.

### Why are the Menu and Floating Button options greyed out?

Those sections are Pro. On the free version their controls are disabled and show a note that Back Button Widget Pro is required.

### The button is not showing. What should I check?

See [Back Button not showing or working](https://wpfactory.com/docs/back-button-not-working/).

### Get more control

The widget, shortcode and PHP function are free. [Back Button Anywhere Widget for WordPress](https://wpfactory.com/item/back-button-widget-wordpress-plugin/) Pro adds menu placement, a floating button and hide or show rules. [See what Pro unlocks](https://wpfactory.com/item/back-button-widget-wordpress-plugin/).

Need a hand? Our team answers every ticket on the [Back Button Widget support forum](https://wpfactory.com/support/item/back-button-widget-wordpress-plugin/).

Related articles

- [Back Button Widget Issues with Custom or Block Themes](https://wpfactory.com/docs/back-button-widget-theme-issues/)
- [Back Button Widget: Additional Tips](https://wpfactory.com/docs/additional-tips-back-btn/)
- [Back Button Widget Troubleshooting](https://wpfactory.com/docs/back-button-slug/)
- [Back Button Widget Pro for WordPress](https://wpfactory.com/docs/back-button-widget-pro/)
- [How to Customize the Back Button (Color, Style, Position, Icon)](https://wpfactory.com/docs/how-to-customize-the-back-button-color-style-position-icon/)

 

[![Back Button Widget for WordPress](https://wpfactory.com/wp-content/uploads/Back-Button-Widget.webp)](https://wpfactory.com/item/back-button-widget-wordpress-plugin/)
