How can I put a wp_redirect into a shortcode?
Shortcode functions are only called when the content of the visual editor is processed and displayed, so nothing in your shortcode function will run early enough. Have a look at the has_shortcode function. If you hook in early enough to send headers and late enough for the query to be set up you can check … Read more