Home › Forums › Front-end Issues › ACF plugin is causing "headers already send by…" error › Reply To: ACF plugin is causing "headers already send by…" error
The problem is here
/**
* Redirect
*/
if (get_field(‘general_redirect’, $bifrost_queried_object) && get_field(‘general_redirect_url’, $bifrost_queried_object)) {
wp_redirect(get_field(‘general_redirect_url’, $bifrost_queried_object));
exit;
}
You are attempting to redirect after HTML output has been started. This code needs to happen before
<!DOCTYPE html>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.