Randomize listings on listings page

On my homepage, I have the listings block set to random and that works.

However, I also have a custom Listings Page. It’s set as the “listings” page in Hive Listings Options.

I have scoured this forum and tried several different PHP snippets to randomize listings on that page. However, none are working. I have also ensured that page (and listings as a post type) are excluded from caching.

What else can I try?

Thanks for your message — our team will reply shortly.

In the meantime, you can also get instant help from our AI Assistant, familiar with all the docs and solutions we’ve shared over the years.

Hi,

Unfortunately, there’s no simple way to do this. We can provide a snippet for random order, but please note that it will randomize on each page refresh, which means there will be issues with pagination. For example, a listing from page 1 might appear on page 2 because the random selection is re-generated for each page.

If you’re familiar with code and custom development, WordPress does have a way to achieve persistent random order through hooks. This Stack Overflow thread might be helpful for that approach: https://stackoverflow.com/questions/69214414/random-order-in-wp-query-with-pagination.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.