on-internet
← Community

How to redirect to a different admin page in WordPress without "headers already sent" error?

Stack Overflow ·

I am writing a WordPress plugin. I want to perform a redirect (after creating database records from POST data) to another admin page. Neither header("Location: ...") nor wp_redirect() work; I receive: Warning: Cannot modify header information - headers already sent by ... How do I properly perform a redirect inside the WordPress admin?

Comments

Sign in or sign up to comment and upvote.

No comments yet.