SOLVED: Posts Element - Order By 'Random' not working (WP Engine)

Hi There!

Using latest Bricks version 1.4.02

So Ive created a query inside the Posts element on a Single Product template. This post section is meant to display a random post in a category called Tips. There are about 10 or so posts in that category.

When I refresh the page, or visit another product, it still shows the same post, even though I have it set to order by Random.

Is there something particular I need to have set in order for this to work properly?

These are my settings:

Hello @daviddemastus

Do you have any caching mechanism set at the server or WordPress level? If yes, that would explain why you see always the same random posts.

Please let us know.

Thank you
Luis

Hi Luis,

I am hosting on WPEngine which I believe has its own built in cacheing system.

Even when I purge the cache and request a new version of the page with /?123 it still shows the same post.

Even as I switch from Random to Date and back to Random, it always starts with the same post. I’m thinking something is up with the posts module itself.

Could you please provide the site URL and login crendentials over help@bricksbuilder.io so we could investigate?

(Please use the email registered during the Bricks license purchase)

Thank you

Sure thing. The license email is my employer’s email, so you’ll see an email from myself with a reference to his email address for the license.

Hello @daviddemastus

Thank you. I already replied to you.

For other users that have the same issue, turns out WP Engine has a mechanism to disable the RANDOM queries by default. You may enable it in the WP Engine > Site Settings > Advanced Configuration.

2 Likes

Yup, that did the trick. Been using WPENGINE for the last 5 years and didn’t know that existed.

Thank you!

1 Like