Create logout page with session in wordpress
session_start();
session_destroy();
session_unset();
//echo '<script LANGUAGE="JavaScript">window.location.href="'.site_url().'";</script>';
if(!isset($_SESSION['ID'])){
echo '<script LANGUAGE="JavaScript">window.location.href="'.site_url().'/login-form";</script>';
}
?>
<script>
location.reload();
</script>
Comments
Post a Comment