{"id":14182,"date":"2025-09-10T14:22:49","date_gmt":"2025-09-10T11:22:49","guid":{"rendered":"https:\/\/creativethemes.com\/blocksy\/?post_type=documentation&#038;p=14182"},"modified":"2025-09-10T14:22:49","modified_gmt":"2025-09-10T11:22:49","slug":"custom-queries-for-advanced-taxonomies-blocks","status":"publish","type":"documentation","link":"https:\/\/creativethemes.com\/blocksy\/docs\/code-snippets\/custom-queries-for-advanced-taxonomies-blocks\/","title":{"rendered":"Custom Queries for Advanced Taxonomies blocks"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"2668\" height=\"1870\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-10-at-14.22.02.png\" alt=\"\" class=\"wp-image-14185\" \/><\/figure>\n\n\n\n<p>When editing an Advanced Taxonomies block, grab the Block ID from the editor sidebar and paste it instead of the placeholder in the snippet below. This requires knowledge of WP_Query.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_filter(\n\t'blocksy:general:blocks:tax-query:args',\n\tfunction ($query_args, $attributes) {\n\t\tif (\n\t\t\tisset($attributes&#091;'uniqueId'])\n\t\t\t&amp;&amp;\n\t\t\t$attributes&#091;'uniqueId'] === 'PLACEHOLDER'\n\t\t) {\n\t\t\t\/\/ Modify $query_args here\n\t\t}\n\n\t\treturn $query_args;\n\t},\n\t10,\n\t2\n);<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>When editing an Advanced Taxonomies block, grab the Block ID from the editor sidebar and paste it instead of the placeholder in the snippet below. This requires knowledge of WP_Query.<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"doc_categories":[125],"class_list":["post-14182","documentation","type-documentation","status-publish","hentry","doc_categories-code-snippets"],"blocksy_meta":[],"acf":[],"_links":{"self":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/documentation\/14182","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/documentation"}],"about":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/types\/documentation"}],"author":[{"embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/comments?post=14182"}],"version-history":[{"count":1,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/documentation\/14182\/revisions"}],"predecessor-version":[{"id":14186,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/documentation\/14182\/revisions\/14186"}],"wp:attachment":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/media?parent=14182"}],"wp:term":[{"taxonomy":"doc_categories","embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/doc_categories?post=14182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}