Warning: Cannot modify header information - headers already sent by (output started at D:\xampp\htdocs\wordpress\wp-includes\formatting.php:5688) in D:\xampp\htdocs\wordpress\wp-includes\pluggable.php on line 961
I am using this function
if(isset($_GET['logout']))
{
//echo "test";
//die();
wp_logout();
wp_redirect("http://localhost:2124/wordpress/game/");
exit;
//wp_logout_url("http://localhost:2124/wordpress/logout_custom");
//exit();
//die();
//wp_redirect(site_url().'/login');
//return "<script> location.replace('".site_url()."/login');</script>";
//exit();
//wp_redirect(site_url()."/login/");
}