Random single CMS item (image) on page refresh

Our client offers their members the option of paid advertising on their site and want to serve custom banner ads that are displayed randomly on each visit/refresh. We have set up the ads in a collection and display singly as “random shuffle”. Of course this means they shuffle after each publish or 12 hours, not every page visit.

I have reviewed some old community posts about javascript fixes for this but these are from before the random shuffle was a feature.

Can anyone advise or point me in the right direction on the simplest way to achieve this? Any help welcome.

Sounds like this is the approach you need-

Thanks Michael, that worked perfectly. Much obliged.

1 Like