View Categories

How to Hide or Show the Back Button by Page or URL

To control where the back button appears, use the conditional options in Back Button Anywhere Widget for WordPress. These are Pro features: you can keep the button off your homepage, hide it when a specific URL parameter is present, or show it only when a parameter is present.

Before you start #

Hide on the front page #

In the Back Button widget (Appearance > Widgets), set Hide on front page to Yes. The button then renders on every page except your site’s front page.

Hide when a URL parameter is present #

Use Hide on URL param and its value field to hide the button on URLs that carry a specific query parameter. For example, to hide the button whenever the URL contains ?noback=1:

  • Hide on URL param: noback
  • Param value: 1

Any page requested with ?noback=1 then hides the button.

Show only when a URL parameter is present #

The shortcode also supports the reverse: show_on_url_param and show_on_url_param_value. With these set, the button is hidden everywhere except URLs that carry the matching parameter and value. This is useful when you only want a back button on pages reached from a particular flow.

[alg_back_button show_on_url_param="from" show_on_url_param_value="results"]

Here the button appears only when the URL includes ?from=results.

Options and attributes reference #

Widget field / attribute Key Effect
Hide on front page hide_on_front_page Hides the button on the site front page.
Hide on URL param hide_on_url_param Query parameter name that triggers hiding.
Param value hide_on_url_param_value Value the parameter must equal to hide.
Show on URL param (shortcode) show_on_url_param Show the button only when this parameter is present.
Show on URL param value (shortcode) show_on_url_param_value Value that parameter must equal to show.

Note: Hide on front page and Hide on URL param are available as widget fields. Show on URL param is available as a shortcode attribute. All of them only take effect on the Pro version.

Troubleshooting #

  • Rules have no effect: confirm you are on the Pro version. The fields are disabled on free.
  • Button never shows with show_on_url_param: that is expected until the matching parameter and value are in the URL.

Ready to set this up? #

Hide and show rules are Pro features of Back Button Widget. Upgrading takes a couple of minutes and unlocks them along with menu placement and the floating button. Get Back Button Widget Pro.