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.
As of April 2026, Random Posts for Query Loop Block is a WordPress random plugin with 0 active installations and a 0/5 rating0. It has been downloaded 157 times in total. Requires WordPress 6.0+ and PHP 7.4+. Available on WordPress.org since 2026. Recently updated within the last 3 months. Top alternative: Random Post Plugin – Redirect URL to….
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.
"rand" to the REST API orderby enum for posts and pages. "orderBy": "rand" safely. | WordPress | 6.0+ requiredTested up to 6.9.4 |
| PHP | 7.4+ required |
rand to the REST API orderby enum so Query Loop can safely use random order.Plugin data sourced from WordPress.org. Analysis and metrics by PluginSift.