I was wondering if it was possible to use wix code to change what a button links to each time the website is loaded?
Example.
Random Link Button is clicked and takes user to new url.
User returns to the website, clicks random link button again, and is taken to a different url than last time.
I want to be able to cycle through a bunch of different urls.
Hi,
You can do this using code.
I’ll give an example for a random linking (and not a rotational one).
Have an array with all the urls, and set the button link when the page is loaded.
Read here about having a random integer in a range.
Sorry to bump this thread, but I’ve been following the advice here and I’m also only getting one page coming up when I press the button. It’s not randomising at all. Any more advice?