\/facet\/query_string<\/h1>\n<\/div>\n<\/div>\n\nThis filter is called before the content is queried from WP_Query<\/code>, WP_Term_Query<\/code> or WP_User_Query<\/code><\/p>\nIt allows to filter content by adding facet slug\/values in the query string. This filter is pretty useful to prefilter content on load.<\/p>\n
\n\n\nArgument<\/td>\n Type<\/td>\n Description<\/td>\n<\/tr>\n \n$query_string<\/td>\n array<\/td>\n Holds query strings parameters<\/td>\n<\/tr>\n \n$grid_id<\/td>\n mixed<\/td>\n Grid ID or template ID\/name<\/td>\n<\/tr>\n \n$action<\/td>\n string<\/td>\n Current action type (render or refresh)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n[pastacode lang=”php” manual=”function%20prefix_filter_query(%20%24query_string%2C%20%24grid_id%2C%20%24action%20)%20%7B%0A%0A%09%09%2F%2F%20If%20the%20content%20is%20not%20filtered%20on%20first%20render.%20%0A%09%09if%20(%20’render’%20%3D%3D%3D%20%24action%20%26%26%20empty(%20%24query_string%20)%20)%20%7B%20%0A%09%09%09%24query_string%20%3D%20%5B%0A%09%09%09%09’rating_facet_slug’%20%3D%3E%20%5B%20’4’%20%5D%2C%0A%09%09%09%09’price_facet_slug’%20%3D%3E%20%5B%20’35’%2C%20’150’%20%5D%2C%20%0A%09%09%09%09’category_facet_slug’%20%3D%3E%20%5B%20’clothing’%2C%20’hoodies’%20%5D%20%0A%09%09%5D%3B%0A%0A%09%7D%0A%0A%09return%20%24query_string%3B%0A%0A%7D%0A%0Aadd_filter(%20’wp_grid_builder%2Ffacet%2Fquery_string’%2C%20’prefix_filter_query’%2C%2010%2C%203%20)%3B” message=”” highlight=”” provider=”manual”\/]<\/p>\n<\/div>\n<\/div>\n\n\t\t<\/div>\n\t<\/div>\n<\/div><\/div><\/div><\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"
\/facet\/query_string This filter is called before the content is queried from WP_Query, WP_Term_Query or WP_User_Query It allows to filter content by adding facet slug\/values in the query string. This filter is pretty useful to prefilter content on load. Argument Type Description $query_string array Holds query strings parameters $grid_id mixed Grid ID or template ID\/name $action…<\/p>\n","protected":false},"author":2,"featured_media":4996,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[44,57,43],"tags":[],"class_list":["post-4887","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-documentation","category-php-filters","category-wp-grid-builder","category-44","category-57","category-43","description-off"],"acf":[],"_links":{"self":[{"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/posts\/4887","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/comments?post=4887"}],"version-history":[{"count":3,"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/posts\/4887\/revisions"}],"predecessor-version":[{"id":5080,"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/posts\/4887\/revisions\/5080"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/media\/4996"}],"wp:attachment":[{"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/media?parent=4887"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/categories?post=4887"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/tags?post=4887"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}
This filter is called before the content is queried from It allows to filter content by adding facet slug\/values in the query string. This filter is pretty useful to prefilter content on load.<\/p>\n [pastacode lang=”php” manual=”function%20prefix_filter_query(%20%24query_string%2C%20%24grid_id%2C%20%24action%20)%20%7B%0A%0A%09%09%2F%2F%20If%20the%20content%20is%20not%20filtered%20on%20first%20render.%20%0A%09%09if%20(%20’render’%20%3D%3D%3D%20%24action%20%26%26%20empty(%20%24query_string%20)%20)%20%7B%20%0A%09%09%09%24query_string%20%3D%20%5B%0A%09%09%09%09’rating_facet_slug’%20%3D%3E%20%5B%20’4’%20%5D%2C%0A%09%09%09%09’price_facet_slug’%20%3D%3E%20%5B%20’35’%2C%20’150’%20%5D%2C%20%0A%09%09%09%09’category_facet_slug’%20%3D%3E%20%5B%20’clothing’%2C%20’hoodies’%20%5D%20%0A%09%09%5D%3B%0A%0A%09%7D%0A%0A%09return%20%24query_string%3B%0A%0A%7D%0A%0Aadd_filter(%20’wp_grid_builder%2Ffacet%2Fquery_string’%2C%20’prefix_filter_query’%2C%2010%2C%203%20)%3B” message=”” highlight=”” provider=”manual”\/]<\/p>\n<\/div>\n<\/div>\n\n\t\t<\/div>\n\t<\/div>\n<\/div><\/div><\/div><\/div>\n<\/div>","protected":false},"excerpt":{"rendered":" \/facet\/query_string This filter is called before the content is queried from WP_Query, WP_Term_Query or WP_User_Query It allows to filter content by adding facet slug\/values in the query string. This filter is pretty useful to prefilter content on load. Argument Type Description $query_string array Holds query strings parameters $grid_id mixed Grid ID or template ID\/name $action…<\/p>\n","protected":false},"author":2,"featured_media":4996,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[44,57,43],"tags":[],"class_list":["post-4887","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-documentation","category-php-filters","category-wp-grid-builder","category-44","category-57","category-43","description-off"],"acf":[],"_links":{"self":[{"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/posts\/4887","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/comments?post=4887"}],"version-history":[{"count":3,"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/posts\/4887\/revisions"}],"predecessor-version":[{"id":5080,"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/posts\/4887\/revisions\/5080"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/media\/4996"}],"wp:attachment":[{"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/media?parent=4887"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/categories?post=4887"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/tags?post=4887"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}WP_Query<\/code>, WP_Term_Query<\/code> or WP_User_Query<\/code><\/p>\n\n\n
\n Argument<\/td>\n Type<\/td>\n Description<\/td>\n<\/tr>\n \n $query_string<\/td>\n array<\/td>\n Holds query strings parameters<\/td>\n<\/tr>\n \n $grid_id<\/td>\n mixed<\/td>\n Grid ID or template ID\/name<\/td>\n<\/tr>\n \n $action<\/td>\n string<\/td>\n Current action type (render or refresh)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n