I would like to ask about the wp_redirect(); function. Before I ask this question, everything was working on both local and test servers. But right now, for some unknown reason, on my local wp_redirect is not working.
My current structure is this:
get_header();
...
wp_redirect($url);
exit();
This was also working with our previous programmer. If I declare my get_header after the wp_redirect, the wp_redirect function will work as intended. However, why is it that before, it was working? Btw, I read this SO Answer after I had this problem.
Were you able to work the wp_redirect after the get_header?
Note: I tried to rollback to previous version and on the old version, other part of the code that uses the same structure above no longer works.
The only difference between the environment was on my local, I accidentally dropped my table and reinstalled from scratch. Other than that, nothing comes to mind.