Random picture with corresponding data from database on a dynamic page

The code is olmost right but as you say there are 2 codes combined.
About the code layout.
Start with imports at the top of the page.
Wix imports above own moduke imports(you don’t use own modules yet but just so you know.
Its easyer to read.
Second, their always is an $w.onready on the page to start.
All code in it is run when the page loads.
Their only can be one $w.onready on the page.
Third, about the 2 combined code.
You made 2 times a random number, 1 time for the image source and 1 time for the other 2 items.
Add the other to items in the codeblock where the image source is set with the random number and use the same random number for it “rnd”

Kind regards,
Kristof.