
Query Loop block configured with <code>"orderBy": "rand"</code> in the Code Editor.
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. "orderBy": "rand" manually using the Code Editor.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".