WordPress plugin intelligence profile

Random Posts for Query Loop Block

Adds "rand" to the REST API orderby options so the Query Loop block can use random post order safely without breaking the Site Editor preview.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 6.9
Current version1.0.5
WordPress coverageTested up to WordPress 6.9
Minimum stackWP 6.0 · PHP 7.4
Directory statusactive
Last directory update7 Jan 20269mo ago
Active installations20Adoption metric — not a quality score
WordPress.org ratingNo WordPress.org ratings yet
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Random Posts for Query Loop Block version 1.0.5 as active, updated 9mo ago and tested up to WordPress 6.9.

Overview

About this plugin

The Query Loop block in WordPress does not include a “Random” ordering option in the sidebar UI.

However, WordPress core does support orderby = rand in WP_Query.

The problem:

Using "orderBy": "rand" inside a Query Loop block can cause the Site Editor preview to fail, because rand is not included in the REST API schema for posts.

This plugin fixes that by extending the REST API orderby enum so the editor recognizes "rand" as valid.

✔ What this plugin does

  • Adds "rand" to the REST API orderby enum for posts and pages.
  • Allows the Query Loop block to use "orderBy": "rand" safely.
  • Prevents JSON errors and broken previews in the Site Editor.
  • Makes “random post” layouts work reliably both in the editor and frontend.

⚠ What this plugin does not do

  • It does not add a “Random” option to the Query Loop UI dropdown.

)

  • You must still set "orderBy": "rand" manually using the Code Editor.

Example use case

Want your homepage, blog, quotes site, testimonials, or featured-section to show

a different post every time the page loads?

Install this plugin → open the template → switch to Code Editor → set "orderBy": "rand".

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • block editor
  • query loop
  • gutenberg
  • orderby
  • random
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 6.9

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 6.9.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to6.9
Minimum requirementsWordPress 6.0 · PHP 7.4
Update activity7 Jan 20269mo ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.