{"id":14993,"date":"2011-09-22T16:51:06","date_gmt":"2011-09-22T16:51:06","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/shortcode-redirect\/"},"modified":"2026-04-16T18:51:20","modified_gmt":"2026-04-16T18:51:20","slug":"shortcode-redirect","status":"publish","type":"plugin","link":"https:\/\/cn.wordpress.org\/plugins\/shortcode-redirect\/","author":194143,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.1.1","stable_tag":"1.1.1","tested":"6.9.4","requires":"6.0","requires_php":"","requires_plugins":null,"header_name":"Shortcode Redirect","header_author":"cartpauj","header_description":"","assets_banners_color":"232053","last_updated":"2026-04-16 18:51:20","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/cartpauj\/shortcode-redirect","header_author_uri":"https:\/\/github.com\/cartpauj","rating":4.3,"author_block_rating":0,"active_installs":10000,"downloads":101711,"num_ratings":31,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.00":{"tag":"1.0.00","author":"cartpauj","date":"2011-09-22 16:51:38"},"1.0.01":{"tag":"1.0.01","author":"cartpauj","date":"2011-10-11 02:30:00"},"1.0.02":{"tag":"1.0.02","author":"cartpauj","date":"2025-05-20 23:13:00"},"1.0.03":{"tag":"1.0.03","author":"cartpauj","date":"2025-08-13 18:54:06"},"1.0.4":{"tag":"1.0.4","author":"cartpauj","date":"2026-04-12 20:58:54"},"1.1.0":{"tag":"1.1.0","author":"cartpauj","date":"2026-04-16 16:42:51"},"1.1.1":{"tag":"1.1.1","author":"cartpauj","date":"2026-04-16 18:51:20"}},"upgrade_notice":{"1.1.1":"<p>Adds a native block editor block alongside the existing shortcode, plus a show\/hide toggle for the &quot;redirecting&quot; message.<\/p>"},"ratings":{"1":3,"2":1,"3":1,"4":4,"5":22},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3508348,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3508348,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3508289,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3508289,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":{"shortcode-redirect\/redirect":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"shortcode-redirect\/redirect","title":"Redirect","category":"widgets","icon":"external","description":"Redirect visitors to another URL after an optional delay.","keywords":["redirect","url","shortcode"],"textdomain":"shortcode-redirect","attributes":{"url":{"type":"string","default":""},"sec":{"type":"number","default":0},"showMessage":{"type":"boolean","default":true}},"supports":{"html":false,"align":false,"customClassName":false,"reusable":true},"editorScript":"file:.\/index.js","editorStyle":"file:.\/editor.css"}},"tagged_versions":["1.0.00","1.0.01","1.0.02","1.0.03","1.0.4","1.1.0","1.1.1"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3508348,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3508348,"resolution":"2","location":"assets","locale":""},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3508348,"resolution":"3","location":"assets","locale":""}},"screenshots":{"1":"The <strong>Redirect<\/strong> block in the block editor \u2014 destination URL, delay, and \"show message\" toggle all live in the block sidebar, with a live summary inside the canvas.","2":"Using the classic <code>[redirect]<\/code> shortcode via the core Shortcode block \u2014 fully backwards compatible.","3":"The default \"Please wait while you are redirected...\" message that visitors see (with a manual fallback link) while the page waits to redirect."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1220,148076,727,80,538],"plugin_category":[43],"plugin_contributors":[79576],"plugin_business_model":[],"class_list":["post-14993","plugin","type-plugin","status-publish","hentry","plugin_tags-block","plugin_tags-gutenberg","plugin_tags-redirect","plugin_tags-shortcode","plugin_tags-url","plugin_category-customization","plugin_contributors-cartpauj","plugin_committers-cartpauj"],"banners":{"banner":"https:\/\/ps.w.org\/shortcode-redirect\/assets\/banner-772x250.png?rev=3508289","banner_2x":"https:\/\/ps.w.org\/shortcode-redirect\/assets\/banner-1544x500.png?rev=3508289","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/shortcode-redirect\/assets\/icon-128x128.png?rev=3508348","icon_2x":"https:\/\/ps.w.org\/shortcode-redirect\/assets\/icon-256x256.png?rev=3508348","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/shortcode-redirect\/assets\/screenshot-1.png?rev=3508348","caption":"The <strong>Redirect<\/strong> block in the block editor \u2014 destination URL, delay, and \"show message\" toggle all live in the block sidebar, with a live summary inside the canvas."},{"src":"https:\/\/ps.w.org\/shortcode-redirect\/assets\/screenshot-2.png?rev=3508348","caption":"Using the classic <code>[redirect]<\/code> shortcode via the core Shortcode block \u2014 fully backwards compatible."},{"src":"https:\/\/ps.w.org\/shortcode-redirect\/assets\/screenshot-3.png?rev=3508348","caption":"The default \"Please wait while you are redirected...\" message that visitors see (with a manual fallback link) while the page waits to redirect."}],"raw_content":"<!--section=description-->\n<p>Shortcode Redirect sends visitors from any post or page to another URL. No settings screens, no database tables \u2014 just drop it in where you need it.<\/p>\n\n<p>There are two ways to use it, and both produce the exact same front-end output.<\/p>\n\n<p><strong>1. The Redirect block (new in 1.1.0)<\/strong><\/p>\n\n<p>In the block editor, add the <strong>Redirect<\/strong> block from the <em>Widgets<\/em> category. The block sidebar exposes three simple fields:<\/p>\n\n<ul>\n<li><strong>Destination URL<\/strong> \u2014 where the visitor should end up<\/li>\n<li><strong>Seconds to wait<\/strong> \u2014 how long to pause before redirecting (<code>0<\/code> = immediate)<\/li>\n<li><strong>Show \"redirecting\" message<\/strong> \u2014 toggle the visible \"Please wait...\" line on or off<\/li>\n<\/ul>\n\n<p>The editor shows a live summary of what the block will do, e.g. <em>\"Redirects to https:\/\/example.com \u2014 after 3 seconds \u00b7 message shown\"<\/em>. No shortcode syntax to memorize.<\/p>\n\n<p><strong>2. The classic shortcode<\/strong><\/p>\n\n<p>Paste into any post or page:<\/p>\n\n<pre><code>[redirect url='https:\/\/example.com' sec='3']\n<\/code><\/pre>\n\n<p>Shortcode attributes:<\/p>\n\n<ul>\n<li><code>url<\/code> \u2014 destination URL <em>(required)<\/em><\/li>\n<li><code>sec<\/code> \u2014 seconds to wait before redirecting <em>(optional, default <code>0<\/code>)<\/em><\/li>\n<li><code>show_message<\/code> \u2014 set to <code>false<\/code>, <code>0<\/code>, <code>no<\/code>, or <code>off<\/code> to hide the \"redirecting\" message <em>(optional, default <code>true<\/code>, new in 1.1.0)<\/em><\/li>\n<\/ul>\n\n<p>Example with all three:<\/p>\n\n<pre><code>[redirect url='https:\/\/example.com' sec='5' show_message='false']\n<\/code><\/pre>\n\n<p><strong>Same output either way<\/strong><\/p>\n\n<p>Block or shortcode, the front-end renders the same single <code>&lt;meta http-equiv=\"refresh\"&gt;<\/code> tag (plus the optional one-line message). No JavaScript. No server-side redirect. No third-party tracking. Existing <code>[redirect]<\/code> shortcodes from earlier versions continue to work unchanged.<\/p>\n\n<h4>Features<\/h4>\n\n<ul>\n<li><strong>Block editor support<\/strong> \u2014 native \"Redirect\" block <em>(new in 1.1.0)<\/em><\/li>\n<li><strong>Classic shortcode<\/strong> \u2014 <code>[redirect]<\/code> works exactly like it always has<\/li>\n<li><strong>Optional delay<\/strong> \u2014 choose how many seconds to wait before redirecting<\/li>\n<li><strong>Silent mode<\/strong> \u2014 hide the \"redirecting...\" message for a clean, blank-page redirect <em>(new in 1.1.0)<\/em><\/li>\n<li><strong>Lightweight<\/strong> \u2014 a single PHP file plus a small block; no settings, no tables, no dependencies<\/li>\n<li><strong>Backwards compatible<\/strong> \u2014 upgrading from 1.0.x is drop-in<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li><p>Install from the WordPress Plugin Directory, or upload <code>shortcode-redirect.zip<\/code> to <code>\/wp-content\/plugins\/<\/code>.<\/p><\/li>\n<li><p>Activate the plugin through the <strong>Plugins<\/strong> menu.<\/p><\/li>\n<li><p>Either:<\/p>\n\n<ul>\n<li>Add the <strong>Redirect<\/strong> block to any post\/page (block inserter \u2192 <em>Widgets<\/em> \u2192 <em>Redirect<\/em>), <strong>or<\/strong><\/li>\n<li>Paste <code>[redirect url='https:\/\/example.com' sec='3']<\/code> into any post\/page.<\/li>\n<\/ul><\/li>\n<\/ol>\n\n<p>No configuration screen to visit \u2014 the plugin activates and is immediately usable.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt id=\"how%20do%20i%20hide%20the%20%22please%20wait%20while%20you%20are%20redirected...%22%20message%3F\"><h3>How do I hide the \"Please wait while you are redirected...\" message?<\/h3><\/dt>\n<dd><p><strong>In the block:<\/strong> toggle off <em>Show \"redirecting\" message<\/em> in the block sidebar.<\/p>\n\n<p><strong>In the shortcode:<\/strong> add <code>show_message='false'<\/code> (also accepts <code>0<\/code>, <code>no<\/code>, or <code>off<\/code>):<\/p>\n\n<pre><code>[redirect url='https:\/\/example.com' sec='3' show_message='false']\n<\/code><\/pre><\/dd>\n<dt id=\"do%20the%20block%20and%20the%20shortcode%20behave%20the%20same%3F\"><h3>Do the block and the shortcode behave the same?<\/h3><\/dt>\n<dd><p>Yes. Both render the same <code>&lt;meta http-equiv=\"refresh\"&gt;<\/code> tag on the front-end. Same delay handling, same message toggle, same output.<\/p><\/dd>\n<dt id=\"can%20i%20mix%20blocks%20and%20shortcodes%20on%20the%20same%20site%3F\"><h3>Can I mix blocks and shortcodes on the same site?<\/h3><\/dt>\n<dd><p>Absolutely. Use whichever fits the page you're editing. Pages built with the old <code>[redirect]<\/code> shortcode keep working when you upgrade \u2014 no migration required.<\/p><\/dd>\n<dt id=\"does%20this%20require%20javascript%20in%20the%20visitor%27s%20browser%3F\"><h3>Does this require JavaScript in the visitor's browser?<\/h3><\/dt>\n<dd><p>No. The redirect is a plain HTML <code>&lt;meta http-equiv=\"refresh\"&gt;<\/code> tag. It works with JavaScript disabled, in text browsers, and inside reader modes.<\/p><\/dd>\n<dt id=\"can%20i%20use%20this%20in%20a%20reusable%20block%20%2F%20synced%20pattern%3F\"><h3>Can I use this in a Reusable Block \/ Synced Pattern?<\/h3><\/dt>\n<dd><p>Yes \u2014 the Redirect block supports reuse, so you can save a configured redirect once and drop it anywhere.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.1.1<\/h4>\n\n<ul>\n<li><strong>New:<\/strong> Native block editor \"Redirect\" block (shares the same render logic as the shortcode)<\/li>\n<li><strong>New:<\/strong> Option to show or hide the \"Please wait while you are redirected...\" message \u2014 via the <code>show_message<\/code> shortcode attribute or the <em>Show \"redirecting\" message<\/em> block toggle<\/li>\n<li>Hardened output escaping, added proper license headers, and added direct-access protection to satisfy Plugin Check<\/li>\n<\/ul>\n\n<h4>1.0.4<\/h4>\n\n<ul>\n<li>Ensure compat with WP 6.9<\/li>\n<\/ul>\n\n<h4>1.0.03<\/h4>\n\n<ul>\n<li>Fix XSS vulnerability (patchstack report efd671f0-81c0-4ca8-bbdb-11e6b63d3fe6)<\/li>\n<\/ul>\n\n<h4>1.0.02<\/h4>\n\n<ul>\n<li>Fixed a low risk security hole<\/li>\n<\/ul>\n\n<h4>1.0.01<\/h4>\n\n<ul>\n<li>Added output buffer to make text show up in the right place<\/li>\n<li>Added license to main file<\/li>\n<li>Fixed URL bug<\/li>\n<\/ul>\n\n<h4>1.0.00<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<\/ul>","raw_excerpt":"Redirect any post or page \u2014 with a native block or a classic shortcode. Optional delay. Optional &quot;redirecting&quot; message. Zero configuration.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/14993","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=14993"}],"author":[{"embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/cartpauj"}],"wp:attachment":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=14993"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=14993"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=14993"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=14993"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=14993"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=14993"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}