[lcw_redirect]

Estimated reading: 2 minutes 235 views

🔗 Shortcode:

URL is required for redirect shortcode

In this example, users will see the message above for 5 seconds before being redirected to the /thank-you page.


⚙️ Attributes

Attribute Type Description Default
url string (Required) The site-relative URL path to redirect to, e.g., /thank-you. Avoid using a full external URL.
delay int Number of seconds to wait before redirecting. Great for displaying a short message first. 0 (instant redirect)
target string Specifies where to open the URL: _self, _blank, _parent, or _top. _self
disable_for_admin boolean When set to true, the redirect will be disabled for administrator users.
This is useful when you’re testing or editing the page and don’t want to be redirected.
false

✅ Features

  • 🔹 Site-relative URLs — automatically works with your WordPress site path.
  • 🔹 Custom messages or HTML displayed before redirect.
  • 🔹 Adjustable delay for a smoother user experience.
  • 🔹 Option to disable redirect for administrators.

🧠 Example Scenarios

Redirect after a short delay with a message:

You’ll be redirected in 3 seconds...

Immediate redirect with no message:

Redirect to a new tab:

Opening in a new tab...

Disable redirect for admin users:

Redirecting... (Admins won’t be redirected)

⚠️ Error Handling

If the url attribute is missing or empty, you’ll see this message:

URL is required for redirect shortcode

Leave a Reply

Your email address will not be published. Required fields are marked *

Share this Doc

[lcw_redirect]

Or copy link

CONTENTS