{"id":10022,"date":"2019-06-13T10:17:56","date_gmt":"2019-06-13T10:17:56","guid":{"rendered":"https:\/\/crocoblock.com\/knowledge-base\/?post_type=article&#038;p=10022"},"modified":"2025-02-17T15:19:35","modified_gmt":"2025-02-17T15:19:35","slug":"how-to-use-meta-field-values-as-data-source-for-filters","status":"publish","type":"article","link":"https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/how-to-use-meta-field-values-as-data-source-for-filters\/","title":{"rendered":"How to Use Values from Meta Fields as Data Source"},"content":{"rendered":"\n<p>If you are using JetEngine, you would definitely want to have an opportunity to filter posts and products by metadata. And it is possible with the JetSmartFilters plugin. This guide will show you how to create a filter that can work with Meta Fields.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"create-meta-field\">Create Meta Field<\/h2>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\"><div class=\"wp-block-group__inner-container\">\n<p>First of all, you have to be sure that the posts or products that will be filtered actually have the needed meta fields. To learn more about the topic &#8211; follow the link and go through our Meta Fields adding tutorial.  In our case, the needed field if the &#8220;Features&#8221; field of Rooms custom post type. Remember the name of the meta field (the one that goes after &#8220;Name:&#8221;), you will need it further.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/02\/features-meta-field.png\" alt=\"features meta field\">\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"create-filter\">Create Filter<\/h2>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\"><div class=\"wp-block-group__inner-container\">\n<p>The next action you need to do is to go to the <strong>SmartFilters<\/strong> block in the WordPress <strong>Dashboard<\/strong> and click the &#8220;<strong>Add New<\/strong>&#8221; button to create a new filter. Type in the <strong>Filter Label<\/strong> and the <strong>Active Filter Label<\/strong>, and proceed to <strong>Filter Settings<\/strong>.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/02\/filter-settings-1-1.png\" alt=\"checkboxes list filter settings\">\n\n\n\n<p>As our Meta Field is checkbox-type, it is proper to choose the &#8220;Checkboxes list&#8221; option in the <strong>Filter Type<\/strong> drop-down menu. To make the filter automatically load the data from meta fields, choose the &#8220;Custom Fields&#8221; option in the <strong>Data Source<\/strong> drop-down list. <\/p>\n\n\n\n<p>Insert the meta field&#8217;s name to the <strong>Custom Field Key<\/strong> bar. To make the filter automatically use options of the meta field, turn the <strong>Get Choices From Field Data<\/strong> toggle on. The <strong>Field Source Plugin<\/strong> must be &#8220;JetEngine&#8221; and as we are using the data from JetEngine, the <strong>Is Checkbox Meta Field (Jet Engine)<\/strong> toggle should also be turned on.<\/p>\n\n\n\n<p>You won&#8217;t be able to finish the filter creating without filling the <strong>Query Variable<\/strong> text area, so paste a meta field name there too. <\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"add-filter-to-page\">Add Filter to Page<\/h2>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\"><div class=\"wp-block-group__inner-container\">\n<p>Open the page where we have a listing for Rooms custom post type items in Elementor editor and add a search for the <strong>Checkboxes Filter widget<\/strong>. Drop it to the section and look at the <strong>Content <\/strong>tab. Select the created filter in the Select filter drop-down menu, and it will automatically create a checkbox list according to the list in the meta field.  <\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/02\/checkbox-filter-settings.png\" alt=\"checkbox filter settings in elementor\">\n\n\n\n<p>Do the rest of the settings and hit the &#8220;<strong>Publish<\/strong>&#8221; or &#8220;<strong>Update<\/strong>&#8221; button. <\/p>\n<\/div><\/div>\n\n\n\n<p>Now you know how to filter publications by values from the meta fields using <strong>JetSmartFilters<\/strong> plugin.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Continue reading this tutorial in case you want to learn how to filter publications by values from their meta fields using JetSmartFilters functionality.<\/p>\n","protected":false},"author":11,"featured_media":0,"template":"","format":"standard","builder-category":[],"article-category":[535],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Filter Posts by Meta Values \u2014 JetSmartFitlers | Crocoblock<\/title>\n<meta name=\"description\" content=\"Create a smart filter and apply it to publications by their values from meta fields. Set the filter with Manual input data source using JetSmartFilters.\" \/>\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\/how-to-use-meta-field-values-as-data-source-for-filters\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Filter Posts by Meta Values \u2014 JetSmartFitlers | Crocoblock\" \/>\n<meta property=\"og:description\" content=\"Create a smart filter and apply it to publications by their values from meta fields. Set the filter with Manual input data source using JetSmartFilters.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/how-to-use-meta-field-values-as-data-source-for-filters\/\" \/>\n<meta property=\"og:site_name\" content=\"Help Center\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-17T15:19:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/02\/features-meta-field.png\" \/>\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=\"3 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\/how-to-use-meta-field-values-as-data-source-for-filters\/\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/how-to-use-meta-field-values-as-data-source-for-filters\/\",\"name\":\"How to Filter Posts by Meta Values \u2014 JetSmartFitlers | Crocoblock\",\"isPartOf\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#website\"},\"datePublished\":\"2019-06-13T10:17:56+00:00\",\"dateModified\":\"2025-02-17T15:19:35+00:00\",\"description\":\"Create a smart filter and apply it to publications by their values from meta fields. Set the filter with Manual input data source using JetSmartFilters.\",\"breadcrumb\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/how-to-use-meta-field-values-as-data-source-for-filters\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/how-to-use-meta-field-values-as-data-source-for-filters\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/how-to-use-meta-field-values-as-data-source-for-filters\/#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\":\"How to Use Values from Meta Fields as Data Source\"}]},{\"@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":"How to Filter Posts by Meta Values \u2014 JetSmartFitlers | Crocoblock","description":"Create a smart filter and apply it to publications by their values from meta fields. Set the filter with Manual input data source using JetSmartFilters.","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\/how-to-use-meta-field-values-as-data-source-for-filters\/","og_locale":"en_US","og_type":"article","og_title":"How to Filter Posts by Meta Values \u2014 JetSmartFitlers | Crocoblock","og_description":"Create a smart filter and apply it to publications by their values from meta fields. Set the filter with Manual input data source using JetSmartFilters.","og_url":"https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/how-to-use-meta-field-values-as-data-source-for-filters\/","og_site_name":"Help Center","article_modified_time":"2025-02-17T15:19:35+00:00","og_image":[{"url":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/02\/features-meta-field.png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/how-to-use-meta-field-values-as-data-source-for-filters\/","url":"https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/how-to-use-meta-field-values-as-data-source-for-filters\/","name":"How to Filter Posts by Meta Values \u2014 JetSmartFitlers | Crocoblock","isPartOf":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#website"},"datePublished":"2019-06-13T10:17:56+00:00","dateModified":"2025-02-17T15:19:35+00:00","description":"Create a smart filter and apply it to publications by their values from meta fields. Set the filter with Manual input data source using JetSmartFilters.","breadcrumb":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/how-to-use-meta-field-values-as-data-source-for-filters\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/how-to-use-meta-field-values-as-data-source-for-filters\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/crocoblock.com\/knowledge-base\/jetsmartfilters\/how-to-use-meta-field-values-as-data-source-for-filters\/#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":"How to Use Values from Meta Fields as Data Source"}]},{"@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\/10022"}],"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\/11"}],"wp:attachment":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=10022"}],"wp:term":[{"taxonomy":"builder-category","embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/builder-category?post=10022"},{"taxonomy":"article-category","embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/article-category?post=10022"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}