{"id":50528,"date":"2026-01-13T14:15:55","date_gmt":"2026-01-13T14:15:55","guid":{"rendered":"https:\/\/crocoblock.com\/knowledge-base\/?post_type=article&#038;p=50528"},"modified":"2026-01-13T14:15:56","modified_gmt":"2026-01-13T14:15:56","slug":"jetsmartfilters-macros-guide","status":"publish","type":"article","link":"https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/jetsmartfilters-macros-guide\/","title":{"rendered":"Macros Guide for JetSmartFilters"},"content":{"rendered":"\n<p>This tutorial explains how the <a href=\"https:\/\/crocoblock.com\/plugins\/jetsmartfilters\/\" target=\"_blank\" rel=\"noreferrer noopener\"><em>JetSmartFilters<\/em><\/a> macros work and how to use them to dynamically pull selected filter values.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"jetsmartfilters-macros\">JetSmartFilters Macros<\/h2>\n\n\n\n<p>The <strong>JetSmartFilters Query<\/strong> macro extracts the selected value from the current query filters. In this context, the filter query is the complete array of arguments that the filter passes to the provider for further processing. Essentially, this encompasses user-selected filter values and the default values they merge with \u2014 everything that affects the filtering result.<\/p>\n\n\n\n<p>The use cases:<\/p>\n\n\n\n<ul>\n<li>Filtering for advanced SQL queries;<\/li>\n\n\n\n<li>Use for dynamic visibility inside filterable listings;<\/li>\n\n\n\n<li><a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/changing-banner-after-filtering-categories\/\" target=\"_blank\" rel=\"noreferrer noopener\">Change the banner after filtering by categories<\/a>.<\/li>\n<\/ul>\n\n\n\n<p>This macro and other macros can be created in the <strong>Macros Generator<\/strong> feature on the <strong><em>JetEngine > JetEngine > Macros Generator<\/em><\/strong> tab.<\/p>\n\n\n\n<p>Here, the \u201cJetSmartFilters Query\u201d macro can be chosen from the <strong>Macros <\/strong>drop-down menu.<\/p>\n\n\n\n<div class=\"wp-block-image size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/01\/jetsmartfilters-query-macro.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1824\" height=\"1100\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/01\/jetsmartfilters-query-macro.webp\" alt=\"jetsmartfilters query macro\" class=\"wp-image-43339\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/01\/jetsmartfilters-query-macro.webp 1824w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/01\/jetsmartfilters-query-macro-300x181.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/01\/jetsmartfilters-query-macro-1024x618.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/01\/jetsmartfilters-query-macro-768x463.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/01\/jetsmartfilters-query-macro-1536x926.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/01\/jetsmartfilters-query-macro-600x362.webp 600w\" sizes=\"(max-width: 1824px) 100vw, 1824px\" \/><\/a><\/div>\n\n\n\n<p>This macro has such settings:&nbsp;<\/p>\n\n\n\n<ul>\n<li><strong>Type<\/strong> \u2014 a dropdown menu to pick where in the filters query we need to search for the value:\n<ul>\n<li><strong>Plain Query Var<\/strong> \u2014 the top-level variable from a query, for example, in the case of the WP_Query, could be post_type, author, post_in, etc.;<\/li>\n\n\n\n<li><strong>Taxonomy<\/strong> \u2014 selected terms from a specific taxonomy from the Tax Query. It searches by taxonomy slug using top-level tax_query elements;<\/li>\n\n\n\n<li><strong>Date<\/strong> \u2014 dates from the date_query array;<\/li>\n\n\n\n<li><strong>Meta field<\/strong> \u2014 selected field value from the meta_query.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Variable Name<\/strong> \u2014 a field to enter the query variable name, meta field name, or taxonomy slug for which you need to retrieve a value. For different types, the variable name may differ:\n<ul>\n<li><strong>Plain Query Var<\/strong> \u2014 for this type, enter the name of the query element to be obtained;<\/li>\n\n\n\n<li><strong>Taxonomy<\/strong> \u2014 type the taxonomy slug whose terms need to be obtained from the tax_query;<\/li>\n\n\n\n<li><strong>Date<\/strong> \u2014 for this type, keep the <strong>Variable Name<\/strong> field empty;<\/li>\n\n\n\n<li><strong>Meta field<\/strong> \u2014 enter the name of the field whose value needs to be obtained from the meta_query.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Date Variable<\/strong> \u2014 if the \u201cDate\u201d <strong>Type<\/strong> is set, here, one can pick the \u201cBefore\u201d or \u201cAfter\u201d query variable to fetch items (e.g., posts) published before or after a certain date.<\/li>\n\n\n\n<li><strong>Result Format<\/strong> \u2014 a dropdown to select how the retrieved value should be processed before usage:\n<ul>\n<li><strong>Plain<\/strong> \u2014 for an unformatted presentation;<\/li>\n\n\n\n<li><strong>Prepare for SQL<\/strong> \u2014 it involves organizing and presenting values to align with SQL syntax and requirements.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Context<\/strong> and <strong>Fallback<\/strong> \u2014 these two options are the same for all macros and are described in the <a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/jetengine-dashboard-settings-overview\/#macros-generator\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Macros Generator<\/strong><\/a> overview.<\/li>\n<\/ul>\n\n\n\n<p>The next two macros are created for the <a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/how-to-set-up-seo-rules\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>JetSmartFilters Seo Rules<\/strong><\/a>:<\/p>\n\n\n\n<ul>\n<li><strong>JetSmartFilters SEO Description<\/strong> \u2014 outputs a dynamically generated SEO description based on the applied filters; useful for SEO-optimized archive pages;<\/li>\n\n\n\n<li><strong>JetSmartFilters SEO Title<\/strong> \u2014 outputs a dynamic SEO title reflecting the current filter state; ideal for improving the visibility of filtered listings.<\/li>\n<\/ul>\n\n\n\n<p>More details are available in the <a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/how-to-set-up-seo-title-and-description-for-filtered-urls\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>How to Set Up SEO Title and Description for Filtered URLs<\/strong><\/a> tutorial.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"query-results-macro-vs-jetsmartfilters-query-macro\">Query Results Macro vs. JetSmartFilters Query Macro<\/h2>\n\n\n\n<p>Although both macros contain the word \u201cquery,\u201d they serve different purposes.<\/p>\n\n\n\n<p>The <strong>JetSmartFilters Query<\/strong> macro works with the filter state. It shows what the user currently enters or selects on the front end.<\/p>\n\n\n\n<p>Use Case: Injecting user choices into a custom \u201c<a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-query-builder-sql-query-type\/\" target=\"_blank\" rel=\"noreferrer noopener\">SQL Query<\/a>\u201d inside the <em>JetEngine<\/em> <a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/query-builder-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Query Builder<\/strong><\/a>. For example, your SQL might look like this: SELECT * FROM my_table WHERE color = &#8216;%jsf_filter_query|color|plain%&#8217;.<\/p>\n\n\n\n<p>The <strong>Query Results<\/strong> macro of <em>JetEngine<\/em> works with the query results. Its purpose is to take the final list produced by one query and hand it over to another.<\/p>\n\n\n\n<p>It&#8217;s ideal for complex queries. Because <em>JetSmartFilters<\/em> sometimes struggles to filter advanced SQL queries directly, use this macro to pass the resulting IDs from your complex SQL query into a standard \u201c<a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/query-builder-posts-query-type\/\" target=\"_blank\" rel=\"noreferrer noopener\">Posts Query<\/a>,\u201d for example.<\/p>\n\n\n\n<p>The usage example is provided in the <a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/how-to-combine-custom-field-and-post-properties-in-search-filter\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>How to Combine Custom Field and Post Properties in Search Filter<\/strong><\/a><strong> <\/strong>tutorial.<\/p>\n\n\n\n<p>That\u2019s all. Now you know about <em>JetSmartFilters<\/em> macros and how to use them on a WordPress website. Additionally, you can check the general <a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/macros-guide\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Macros Guide<\/strong><\/a> for <a href=\"https:\/\/crocoblock.com\/plugins\/jetengine\/\" target=\"_blank\" rel=\"noreferrer noopener\"><em>JetEngine<\/em><\/a> and other Crocoblock plugins.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Explore JetSmartFilters Macros, including Query, SEO Title, SEO Description, and learn how to create dynamic, filter-based content in WordPress.<\/p>\n","protected":false},"author":8,"featured_media":0,"template":"","format":"standard","builder-category":[],"article-category":[416],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Macros Guide \u2014 JetSmartFilters | Crocoblock<\/title>\n<meta name=\"description\" content=\"Explore JetSmartFilters Macros, including Query, SEO Title, SEO Description, and learn how to create dynamic, filter-based content in WordPress.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/jetsmartfilters-macros-guide\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Macros Guide \u2014 JetSmartFilters | Crocoblock\" \/>\n<meta property=\"og:description\" content=\"Explore JetSmartFilters Macros, including Query, SEO Title, SEO Description, and learn how to create dynamic, filter-based content in WordPress.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/jetsmartfilters-macros-guide\/\" \/>\n<meta property=\"og:site_name\" content=\"Help Center\" \/>\n<meta property=\"article:modified_time\" content=\"2026-01-13T14:15:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/01\/jetsmartfilters-query-macro.webp\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/jetsmartfilters-macros-guide\/\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/jetsmartfilters-macros-guide\/\",\"name\":\"Macros Guide \u2014 JetSmartFilters | Crocoblock\",\"isPartOf\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#website\"},\"datePublished\":\"2026-01-13T14:15:55+00:00\",\"dateModified\":\"2026-01-13T14:15:56+00:00\",\"description\":\"Explore JetSmartFilters Macros, including Query, SEO Title, SEO Description, and learn how to create dynamic, filter-based content in WordPress.\",\"breadcrumb\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/jetsmartfilters-macros-guide\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/jetsmartfilters-macros-guide\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/jetsmartfilters-macros-guide\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/crocoblock.com\/knowledge-base\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Articles\",\"item\":\"https:\/\/crocoblock.com\/knowledge-base\/articles\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Macros Guide for JetSmartFilters\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#website\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/\",\"name\":\"Help Center\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/crocoblock.com\/knowledge-base\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#organization\",\"name\":\"Help Center\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg\",\"contentUrl\":\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg\",\"caption\":\"Help Center\"},\"image\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Macros Guide \u2014 JetSmartFilters | Crocoblock","description":"Explore JetSmartFilters Macros, including Query, SEO Title, SEO Description, and learn how to create dynamic, filter-based content in WordPress.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/jetsmartfilters-macros-guide\/","og_locale":"en_US","og_type":"article","og_title":"Macros Guide \u2014 JetSmartFilters | Crocoblock","og_description":"Explore JetSmartFilters Macros, including Query, SEO Title, SEO Description, and learn how to create dynamic, filter-based content in WordPress.","og_url":"https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/jetsmartfilters-macros-guide\/","og_site_name":"Help Center","article_modified_time":"2026-01-13T14:15:56+00:00","og_image":[{"url":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/01\/jetsmartfilters-query-macro.webp"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/jetsmartfilters-macros-guide\/","url":"https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/jetsmartfilters-macros-guide\/","name":"Macros Guide \u2014 JetSmartFilters | Crocoblock","isPartOf":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#website"},"datePublished":"2026-01-13T14:15:55+00:00","dateModified":"2026-01-13T14:15:56+00:00","description":"Explore JetSmartFilters Macros, including Query, SEO Title, SEO Description, and learn how to create dynamic, filter-based content in WordPress.","breadcrumb":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/jetsmartfilters-macros-guide\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/jetsmartfilters-macros-guide\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/jetsmartfilters-macros-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/crocoblock.com\/knowledge-base\/"},{"@type":"ListItem","position":2,"name":"Articles","item":"https:\/\/crocoblock.com\/knowledge-base\/articles\/"},{"@type":"ListItem","position":3,"name":"Macros Guide for JetSmartFilters"}]},{"@type":"WebSite","@id":"https:\/\/crocoblock.com\/knowledge-base\/#website","url":"https:\/\/crocoblock.com\/knowledge-base\/","name":"Help Center","description":"","publisher":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/crocoblock.com\/knowledge-base\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/crocoblock.com\/knowledge-base\/#organization","name":"Help Center","url":"https:\/\/crocoblock.com\/knowledge-base\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/","url":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg","contentUrl":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg","caption":"Help Center"},"image":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/article\/50528"}],"collection":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/types\/article"}],"author":[{"embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/users\/8"}],"wp:attachment":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=50528"}],"wp:term":[{"taxonomy":"builder-category","embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/builder-category?post=50528"},{"taxonomy":"article-category","embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/article-category?post=50528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}