Problems with Query builder - Random, with Custom post types

I want to use random background images on a section background. I have set up Custom Post Types, and Provider/Consumer. It works on the backend, but it only shows a static photo on the front end on each refresh.

I have used the Section as the Provider, and Consumer on a child element (Div).

Why doesn’t Order by - Random, work on the front end?

Here’s the page I’m testing on.

SCR-20241220-nxnu

Hello Anders,

Thank you for the inquiry.

Did you create a custom post type for the background? How did you apply the images to the posts? Please provide the login details in the secure note so we can check it further.

Best regards,
Ismael

I added a CPT for the Background images. I tried two different methods:

  1. Select image
  2. Image URL

The image URL Custom Post Field worked. And, as I said, works logged in. But on the front end, it’s locked to a static image.

Hello Anders,

The image is static because you have added this custom inline CSS:

The Random display of the custom post type is working as well. Be advised that you only have 3 items. Thus, there will be a 33% chance that the same particular item will be displayed as soon as you refresh the page.

Hope this helps.