I have a sign out on my site to log out of Wordpress
When logged out I would like to redirect uses to a different URL.
I'm using this in the functions.php
add_action(' wp_logout ',' auto_redirect_external_after_logout '); function auto_redirect_external_after_logout(){ wp_redirect( ' http://redirect-url ' ); exit(); } and this in the header
<li class="signOut"><?php wp_logout(); ?></li> When I run this I get a long list of errors in the page
Warning: Cannot modify header information - headers already sent by