Hello, I’m trying to get instant redirect to different sites based on the day of the week. I have this over on my website which run on WordPress. Even though this seems like trivial mater so far I’m in no luck finding solution. I tried the same with sipnet in WPCode but the script just does not seem to take effect. Any help will be appropriated.
!DOCTYPE html>
<html>
<head>
<title>Crossroad</title>
<meta charset=”UTF-8″ />
<script>
var (today) = new Date().getDay;
switch (today) {
case 0: case 1: case 2: case 5: case 6:
window.location.replace = “https://www.youtube.com/”
break;
case 3: case 4:
window.location.replace = “https://www.google.com/”
break;
}
</script>
</head>
<body>
</body>
</html>
Have you checked DevTools? Share the url to the page.