Docs    Instagram    Documentation

Random Sorting Doesn’t Work On Every Page Load

Posts only reshuffle when the feed cache clears, which keeps pages fast. Lower the caching time to reshuffle more often.

Would you like to know why your Instagram feed shows the same random order on every page load, and how to reshuffle it?

When you sort a feed randomly, Instagram Feed shuffles the posts once and saves that order with the feed’s cache. The order then stays the same until the cache refreshes.

Before you get started, make sure Instagram Feed is installed and activated on your WordPress site.

Why the Order Stays the Same

Instagram Feed saves your posts in a cache so your pages load quickly and the plugin makes fewer requests to Instagram. A feed with random sorting saves its posts in the shuffled order. This keeps the order steady while visitors click Load More. That way, no post shows twice or goes missing.

Random sorting is a Sort setting of the feed. To turn it on, follow these steps.

  1. In the WordPress dashboard, go to Instagram Feed » All Feeds. Then click the name of the feed to open it.
  2. Next, click the Settings tab. Then click the Sort section.
  3. Under Sort Posts by, choose Random. The other choices are Newest and Likes.
  4. When you’re done, click Save.

Which Posts Are Shuffled

With random sorting on, the plugin asks Instagram for more posts than your feed shows. It shuffles all of the posts it receives and saves them in that order.

Your feed shows posts from the top of the saved list. The number of posts it shows comes from the Number of Posts setting in the Feed Layout section of the Customize tab. To add a Load More button for the rest of your posts, see our guide on setting up the Load More button and Infinite Scroll.

This means a small Number of Posts still picks from a larger pool. If your Instagram account has only a few posts in total, there are not many to choose from. The shuffle can only rearrange those same posts.

Reshuffling the Feed

The feed gets a new random order after its cache refreshes. You can refresh it yourself, or wait for the schedule.

Clearing the Feed Cache

  1. In the WordPress dashboard, go to Instagram Feed » Settings. Then click the Feeds tab.
  2. In the Caching box, click Clear All Caches.

The next time the feed loads, the plugin builds it again and saves a new random order.

The Caching box also sets how often the plugin refreshes the cache on its own. The choices are Every 30 minutes, Every hour, Every 12 hours, and Every 24 hours. A shorter interval reshuffles the feed more often. Between refreshes, the feed keeps its saved order.

For how the interval works, see our guide on why a feed updates slowly or not at all.

Checking Your Page Cache

A caching plugin or your host’s cache can also show visitors the same random order. It saves a finished copy of your page, feed included. The posts in that copy do not change until the page cache clears.

After you clear the feed cache, clear your page cache too. Then reload the page. See How to Clear Your Cache in WordPress for a step-by-step guide.

The Load Initial Posts with AJAX setting, in Instagram Feed » Settings on the Advanced tab, can help a feed on a cached page follow the plugin’s own caching.

For what it does and how to turn it on, see our guide on what to do when your feed page loads slowly.

Version 6.14.0 also fixed feeds that showed up empty on pages served from a long-lived page cache. It also fixed Load More not working on those pages. If you use a page cache and run an earlier version, update to the latest version of Instagram Feed.

That’s it! You now know why a random feed keeps its order and how to reshuffle it. Next, learn how often your feed checks for new posts in our guide on feed updates.

Frequently Asked Questions

Below, we’ve answered some of the most common questions about random sorting.

Do I need Instagram Feed Pro for random sorting?

No. Random is a Sort Posts by choice in Instagram Feed. Only the Likes choice needs Instagram Feed Pro.

How often does a random feed get a new order?

The feed gets a new random order each time its cache refreshes. You can refresh it right away with Clear All Caches, or choose a shorter interval in the Caching box.

support

Couldn’t find your answer in the docs?

Contact Support