{"id":16825065,"date":"2023-06-16T15:11:33","date_gmt":"2023-06-16T15:11:33","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/generateblocks_query_loop_args\/"},"modified":"2023-06-16T15:16:57","modified_gmt":"2023-06-16T15:16:57","slug":"generateblocks_query_loop_args","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/generateblocks_query_loop_args\/","title":{"rendered":"generateblocks_query_loop_args"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Hi,<br \/>I have a dropdown which it is planned to allow &#8216;sorting&#8217; of listings within a QueryLoop. The dropdown\/select is created by a shortcode on the page. I then have a JS file that adds a class to &#8216;gb-query-loop-wrapper&#8217;. Then the PHP from the <strong><a href=\"https:\/\/gist.github.com\/macgraphic\/2cd1ba41afd2ec5e51880c1e9dfb80c5\" target=\"_blank\" rel=\"noreferrer noopener\">GIST<\/a><\/strong> adds\/removes the class to the wrapper.<br \/>I can see it is adding the class as expected to the wrapper, but it&#8217;s not changing the ordering of the loop.<br \/>Is it not possible to do this, or is there something else I&#8217;ve missed?<br \/>Thanks, Mark<\/p>\n","protected":false},"template":"","class_list":["post-16825065","topic","type-topic","status-publish","hentry","topic-tag-query-loop"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16825065","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16825065\/revisions"}],"predecessor-version":[{"id":16825084,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16825065\/revisions\/16825084"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=16825065"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}