I would like to query loop and cpt and get only one result randomly each page load. I tried the following, hpwever I am always gettting the same result.
You need to set random seed TTL value to 0.
From academy documentation:
Random seed TTL: Duration in minutes for which the random seed exists. Set to prevent duplicate post results (only needed & available when using a random order query loop). Set “0” to turn this feature off.
If you set the TTL to 10 minutes, the query result remains the same for the next 10 minutes. This ensures that no duplicate posts are displayed on different pages or when the infinite scroll is active.
Cheers!
1 Like