Title: Shortcode Redirect
Author: cartpauj
Published: <strong>22. september 2011</strong>
Last modified: 16. april 2026

---

Søk gjennom innstikk

![](https://ps.w.org/shortcode-redirect/assets/banner-772x250.png?rev=3508289)

![](https://ps.w.org/shortcode-redirect/assets/icon-256x256.png?rev=3508348)

# Shortcode Redirect

 Av [cartpauj](https://profiles.wordpress.org/cartpauj/)

[Last ned](https://downloads.wordpress.org/plugin/shortcode-redirect.1.1.1.zip)

 * [Detaljar](https://nn.wordpress.org/plugins/shortcode-redirect/#description)
 * [Omtalar](https://nn.wordpress.org/plugins/shortcode-redirect/#reviews)
 *  [Installasjon](https://nn.wordpress.org/plugins/shortcode-redirect/#installation)
 * [Utvikling](https://nn.wordpress.org/plugins/shortcode-redirect/#developers)

 [Hjelp](https://wordpress.org/support/plugin/shortcode-redirect/)

## Skildring

Shortcode Redirect sends visitors from any post or page to another URL. No settings
screens, no database tables — just drop it in where you need it.

There are two ways to use it, and both produce the exact same front-end output.

**1. The Redirect block (new in 1.1.0)**

In the block editor, add the **Redirect** block from the _Widgets_ category. The
block sidebar exposes three simple fields:

 * **Destination URL** — where the visitor should end up
 * **Seconds to wait** — how long to pause before redirecting (`0` = immediate)
 * **Show «redirecting» message** — toggle the visible «Please wait…» line on or
   off

The editor shows a live summary of what the block will do, e.g. _«Redirects to https://
example.com — after 3 seconds · message shown»_. No shortcode syntax to memorize.

**2. The classic shortcode**

Paste into any post or page:

    ```
    [redirect url='https://example.com' sec='3']
    ```

Shortcode attributes:

 * `url` — destination URL _(required)_
 * `sec` — seconds to wait before redirecting _(optional, default `0`)_
 * `show_message` — set to `false`, `0`, `no`, or `off` to hide the «redirecting»
   message _(optional, default `true`, new in 1.1.0)_

Example with all three:

    ```
    [redirect url='https://example.com' sec='5' show_message='false']
    ```

**Same output either way**

Block or shortcode, the front-end renders the same single `<meta http-equiv="refresh"
>` tag (plus the optional one-line message). No JavaScript. No server-side redirect.
No third-party tracking. Existing `[redirect]` shortcodes from earlier versions 
continue to work unchanged.

#### funksjoner

 * **Block editor support** — native «Redirect» block _(new in 1.1.0)_
 * **Classic shortcode** — `[redirect]` works exactly like it always has
 * **Optional delay** — choose how many seconds to wait before redirecting
 * **Silent mode** — hide the «redirecting…» message for a clean, blank-page redirect_(
   new in 1.1.0)_
 * **Lightweight** — a single PHP file plus a small block; no settings, no tables,
   no dependencies
 * **Backwards compatible** — upgrading from 1.0.x is drop-in

## Skjermbilete

 * [[
 * The **Redirect** block in the block editor — destination URL, delay, and «show
   message» toggle all live in the block sidebar, with a live summary inside the
   canvas.
 * [[
 * Using the classic `[redirect]` shortcode via the core Shortcode block — fully
   backwards compatible.
 * [[
 * The default «Please wait while you are redirected…» message that visitors see(
   with a manual fallback link) while the page waits to redirect.

## Blokker

Denne utvidinga gjev 1 blokk.

 *   Redirect Redirect visitors to another URL after an optional delay.

## Installasjon

 1. Install from the WordPress Plugin Directory, or upload `shortcode-redirect.zip`
    to `/wp-content/plugins/`.
 2. Activate the plugin through the **Plugins** menu.
 3. Either:
 4.  * Add the **Redirect** block to any post/page (block inserter  _Widgets_  _Redirect_),**
       or**
     * Paste `[redirect url='https://example.com' sec='3']` into any post/page.

No configuration screen to visit — the plugin activates and is immediately usable.

## Vanlege spm.

### How do I hide the «Please wait while you are redirected…» message?

**In the block:** toggle off _Show «redirecting» message_ in the block sidebar.

**In the shortcode:** add `show_message='false'` (also accepts `0`, `no`, or `off`):

    ```
    [redirect url='https://example.com' sec='3' show_message='false']
    ```

### Do the block and the shortcode behave the same?

Yes. Both render the same `<meta http-equiv="refresh">` tag on the front-end. Same
delay handling, same message toggle, same output.

### Can I mix blocks and shortcodes on the same site?

Absolutely. Use whichever fits the page you’re editing. Pages built with the old`[
redirect]` shortcode keep working when you upgrade — no migration required.

### Does this require JavaScript in the visitor’s browser?

No. The redirect is a plain HTML `<meta http-equiv="refresh">` tag. It works with
JavaScript disabled, in text browsers, and inside reader modes.

### Can I use this in a Reusable Block / Synced Pattern?

Yes — the Redirect block supports reuse, so you can save a configured redirect once
and drop it anywhere.

## Omtalar

![](https://secure.gravatar.com/avatar/b9a182d38d921269ac718934cd3409ec69a6030d4ab9b3a12fa45da7acc870b2?
s=60&d=retro&r=g)

### 󠀁[Works WP 6.5](https://wordpress.org/support/topic/works-wp-6-5-2/)󠁿

 [flyingkites](https://profiles.wordpress.org/flyingkites/) 9. april 2024

Just wish there was an option to open in a new tab. Work around was to open the 
redirected page in a new tab instead.

![](https://secure.gravatar.com/avatar/57d54708ccd1f17cc14056ceea3e119b39cb32607e1553c0bb8f5ab18437d961?
s=60&d=retro&r=g)

### 󠀁[Exactly what I needed](https://wordpress.org/support/topic/exactly-what-i-needed-921/)󠁿

 [chicagola](https://profiles.wordpress.org/chicagola/) 24. august 2023

It is simple and easy to use. Just wish the text wasn’t showing on the frontend.
But it is an easy fix so I give it a 5 stars! Thank you for making this plugin!

![](https://secure.gravatar.com/avatar/7b281d00eb8ae832f09eeaea4158dfee15c9120bcac2d195609a3bda8d461a2a?
s=60&d=retro&r=g)

### 󠀁[Terima Kasih](https://wordpress.org/support/topic/terima-kasih-9/)󠁿

 [erwinprasetyo](https://profiles.wordpress.org/erwinprasetyo/) 19. januar 2022

Pluginnya berfungsi, semoga kedepannya ada pengaturan opsi lebih lanjut (sorry i
write in indonesian bahasa)

![](https://secure.gravatar.com/avatar/0474f4b72a7e91632ae2a849848b76ff88eb0a3c07d4ae3af833a959db51102d?
s=60&d=retro&r=g)

### 󠀁[Worked great for us.](https://wordpress.org/support/topic/worked-great-for-us-3/)󠁿

 [Delaware Genealogical Society](https://profiles.wordpress.org/delawaregenealogy/)
13. august 2021

For a basic redirection on a page, it worked great.

![](https://secure.gravatar.com/avatar/51598b0b2c6e04f84dc1a20465364a46ab269ec010a437abbad29ddada9901f2?
s=60&d=retro&r=g)

### 󠀁[Super easy and super super effective](https://wordpress.org/support/topic/super-easy-and-super-super-effective/)󠁿

 [arbeola12](https://profiles.wordpress.org/arbeola12/) 1. april 2021

it works perfectly as it should, saved us a lot of coding time.

![](https://secure.gravatar.com/avatar/3e7f0563b7f002599843621697380f06669e973acdda99a59117d12f3a2200e1?
s=60&d=retro&r=g)

### 󠀁[Still Working](https://wordpress.org/support/topic/still-working-100/)󠁿

 [epilude](https://profiles.wordpress.org/epilude/) 19. august 2020

Using Wordpress v5.5 As far as I can tell this plugin still works. Very easy to 
set up.

 [ Les alle 31 omtalar ](https://wordpress.org/support/plugin/shortcode-redirect/reviews/)

## Bidragsytarar og utviklarar

“Shortcode Redirect” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ cartpauj ](https://profiles.wordpress.org/cartpauj/)

[Omset “Shortcode Redirect” til ditt eige språk.](https://translate.wordpress.org/projects/wp-plugins/shortcode-redirect)

### Interested in development?

[Les kjeldekoden](https://plugins.trac.wordpress.org/browser/shortcode-redirect/),
sjekk [SVN-lageret](https://plugins.svn.wordpress.org/shortcode-redirect/) eller
abonner på [utviklingsloggen](https://plugins.trac.wordpress.org/log/shortcode-redirect/)
med [RSS](https://plugins.trac.wordpress.org/log/shortcode-redirect/?limit=100&mode=stop_on_copy&format=rss).

## Endringslogg

#### 1.1.1

 * **New:** Native block editor «Redirect» block (shares the same render logic as
   the shortcode)
 * **New:** Option to show or hide the «Please wait while you are redirected…» message—
   via the `show_message` shortcode attribute or the _Show «redirecting» message_
   block toggle
 * Hardened output escaping, added proper license headers, and added direct-access
   protection to satisfy Plugin Check

#### 1.0.4

 * Ensure compat with WP 6.9

#### 1.0.03

 * Fix XSS vulnerability (patchstack report efd671f0-81c0-4ca8-bbdb-11e6b63d3fe6)

#### 1.0.02

 * Fixed a low risk security hole

#### 1.0.01

 * Added output buffer to make text show up in the right place
 * Added license to main file
 * Fixed URL bug

#### 1.0.00

 * Initial release

## Om

 *  Version **1.1.1**
 *  Last updated **2 dagar sidan**
 *  Active installations **10 000+**
 *  WordPress version ** 6.0 eller nyare **
 *  Tested up to **6.9.4**
 *  Language
 * [English (US)](https://wordpress.org/plugins/shortcode-redirect/)
 * Tags
 * [block](https://nn.wordpress.org/plugins/tags/block/)[gutenberg](https://nn.wordpress.org/plugins/tags/gutenberg/)
   [redirect](https://nn.wordpress.org/plugins/tags/redirect/)[shortcode](https://nn.wordpress.org/plugins/tags/shortcode/)
   [url](https://nn.wordpress.org/plugins/tags/url/)
 *  [Avansert vising](https://nn.wordpress.org/plugins/shortcode-redirect/advanced/)

## Vurderingar

 4.3 out of 5 stars.

 *  [  22 5-star reviews     ](https://wordpress.org/support/plugin/shortcode-redirect/reviews/?filter=5)
 *  [  4 4-star reviews     ](https://wordpress.org/support/plugin/shortcode-redirect/reviews/?filter=4)
 *  [  1 3-star review     ](https://wordpress.org/support/plugin/shortcode-redirect/reviews/?filter=3)
 *  [  1 2-star review     ](https://wordpress.org/support/plugin/shortcode-redirect/reviews/?filter=2)
 *  [  3 1-star reviews     ](https://wordpress.org/support/plugin/shortcode-redirect/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/shortcode-redirect/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/shortcode-redirect/reviews/)

## Contributors

 *   [ cartpauj ](https://profiles.wordpress.org/cartpauj/)

## Hjelp

Har du noko å seia? Treng du hjelp?

 [Sjå hjelpeforumet](https://wordpress.org/support/plugin/shortcode-redirect/)