top of page
Anchor 1

Wix Tutorial - Automatically redirect to another page after a time delay, using Wix Code

This code lets you automatically redirect to another page after a short time delay.

Elements:

Elements:

  • Page redirected from /redirect

  • Page redirected to /automatically-redirect (this page)

Wix Code:

import wixLocation from 'wix-location';

 

$w.onReady(function () {

    setTimeout(() => {

        wixLocation.to("/automatically-redirect");

    }, 5000);

});

bottom of page