[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$ffEVLH1CM-GdZnVcOAL6TYaJHI2QtkPyN67FL-4rIvgY":3},{"slug":4,"display_name":5,"profile_url":6,"plugin_count":7,"total_installs":8,"avg_security_score":9,"avg_patch_time_days":10,"trust_score":11,"computed_at":12,"plugins":13},"ctrs","Abhay Rautela","https:\u002F\u002Fprofiles.wordpress.org\u002Fctrs\u002F",1,0,100,30,94,"2026-04-04T09:59:43.141Z",[14],{"slug":15,"name":16,"version":17,"author":5,"author_profile":6,"description":18,"short_description":19,"active_installs":8,"downloaded":20,"rating":8,"num_ratings":8,"last_updated":21,"tested_up_to":22,"requires_at_least":23,"requires_php":24,"tags":25,"homepage":31,"download_link":32,"security_score":9,"vuln_count":8,"unpatched_count":8,"last_vuln_date":33,"fetched_at":34},"random-posts-for-query-loop-block","Random Posts for Query Loop Block","1.0.5","\u003Cp>The Query Loop block in WordPress does not include a “Random” ordering option in the sidebar UI.\u003Cbr \u002F>\nHowever, WordPress core \u003Cem>does\u003C\u002Fem> support \u003Ccode>orderby = rand\u003C\u002Fcode> in \u003Ccode>WP_Query\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cp>The problem:\u003Cbr \u002F>\nUsing \u003Ccode>\"orderBy\": \"rand\"\u003C\u002Fcode> inside a Query Loop block can cause the \u003Cstrong>Site Editor preview to fail\u003C\u002Fstrong>, because \u003Ccode>rand\u003C\u002Fcode> is not included in the REST API schema for posts.\u003C\u002Fp>\n\u003Cp>This plugin fixes that by extending the REST API orderby enum so the editor recognizes \u003Ccode>\"rand\"\u003C\u002Fcode> as valid.\u003C\u002Fp>\n\u003Ch3>✔ What this plugin does\u003C\u002Fh3>\n\u003Cul>\n\u003Cli>Adds \u003Ccode>\"rand\"\u003C\u002Fcode> to the REST API \u003Ccode>orderby\u003C\u002Fcode> enum for posts and pages.  \u003C\u002Fli>\n\u003Cli>Allows the Query Loop block to use \u003Ccode>\"orderBy\": \"rand\"\u003C\u002Fcode> safely.  \u003C\u002Fli>\n\u003Cli>Prevents JSON errors and broken previews in the Site Editor.  \u003C\u002Fli>\n\u003Cli>Makes “random post” layouts work reliably both in the editor and frontend.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch3>⚠ What this plugin does \u003Cem>not\u003C\u002Fem> do\u003C\u002Fh3>\n\u003Cul>\n\u003Cli>It does \u003Cstrong>not\u003C\u002Fstrong> add a “Random” option to the Query Loop UI dropdown.\u003Cbr \u002F>\n(That UI is defined in Gutenberg’s JavaScript.)\u003C\u002Fli>\n\u003Cli>You must still set \u003Ccode>\"orderBy\": \"rand\"\u003C\u002Fcode> manually using the Code Editor.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch3>Example use case\u003C\u002Fh3>\n\u003Cp>Want your homepage, blog, quotes site, testimonials, or featured-section to show\u003Cbr \u002F>\n\u003Cstrong>a different post every time the page loads?\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cp>Install this plugin \u003Cspan aria-hidden=\"true\" class=\"wp-exclude-emoji\">→\u003C\u002Fspan> open the template \u003Cspan aria-hidden=\"true\" class=\"wp-exclude-emoji\">→\u003C\u002Fspan> switch to Code Editor \u003Cspan aria-hidden=\"true\" class=\"wp-exclude-emoji\">→\u003C\u002Fspan> set \u003Ccode>\"orderBy\": \"rand\"\u003C\u002Fcode>.\u003C\u002Fp>\n","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.",135,"2026-01-07T20:22:00.000Z","6.9.4","6.0","7.4",[26,27,28,29,30],"block-editor","gutenberg","orderby","query-loop","random","https:\u002F\u002Fconetrees.com\u002Fproducts\u002Fwordpress-plugins\u002Frandom-posts-query-loop\u002F","https:\u002F\u002Fdownloads.wordpress.org\u002Fplugin\u002Frandom-posts-for-query-loop-block.1.0.5.zip",null,"2026-03-15T14:54:45.397Z"]