
內容簡介
這款「Shortcode Redirect」外掛讓網站擁有者在網站的頁面或文章上查看特定的秒數之後,自動將使用者重新導向到其他網站。外掛的使用方式非常簡單,只需在貼文/頁面中加入以下格式的短碼:[redirect url='http://somesite.com' sec='3'] url= 處是設定要導向的網站 URL,sec= 處是設定等待幾秒後導向。
捐贈
如果你喜歡這個外掛,請考慮捐贈
功能
可於頁面和文章上使用
無需設定,易於運用
設定要導向的網站 URL
設定導向前等待的秒數
備註
「Shortcode Redirect」理論上應該能運作於舊版的 WordPress 上,但基於未測試 2.7 以外的版本,因此可能會有不確定的問題。
外掛標籤
開發者團隊
原文外掛簡介
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 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.
Features
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
