Redirection not working for admin environment.
-
Heya,
I’ve got a problem with redirection after, for instance, updating a field in a plugin I’m implementing. This is what I do:
1) I post a form from events-manager.php to events-update.php in the administrator section of wordpress.
2) I carry out some commands in events-update.php and then I want to redirect back to events-manager.php with a query string like “updated=true” so I can use the fancy fading update text, but alas, the error I get is:
Warning: Cannot modify header information - headers already sent by (output started at /home/neuro/domains/neuro.nl/public_html/blog/wp-admin/admin-header.php:16) in
Any ideas as to how I can redirect in any of my plugins? I’ve made absolutely sure my scripts do NOT output any HTML before redirecting, so I’m guessing it’s something to do with how wordpress handles redirects?
I’ve also tried using:
add_action('init', 'function_with_redirect')
But that doesn’t work either, apparently. Any ideas or suggestions would be greatly appreciated!
Thanks in advance!
- The topic ‘Redirection not working for admin environment.’ is closed to new replies.