Quantcast
Channel: Conditional custom redirect - WordPress Development Stack Exchange
Viewing all articles
Browse latest Browse all 2

Conditional custom redirect

$
0
0

I want to achieve the following:

  • On a post or a page, I can define an optional custom redirect URL (possibly as an Advanced Custom Field)
  • If I view this post/page with a specific added URL parameter (like "?redirect=true", send a redirect to the defined custom URL, otherwise do not redirect.

My naive approach would be to add this as a javascript to the post/page template.

Is there a better option? Or a plugin I could (ab)use for that purpose?


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>