I’ve been working on building a web application in WordPress on which I’m implementing a set of rewrite rules to introduce RESTful routing into the application.
Once the application is done, I hope to provide a significantly more in-depth post on how I built it, but in the mean time I figured I’d cover how I’m handling certain challenges that I’ve faced in development.
In this case, I needed to fire a call to wp_redirect
after a certain event happened, but kept getting the PHP error:
Cannot modify header information - headers already sent by (output started ... )
Here’s how I ended up resolving the wp_redirect headers already sent message.