{"id":17882,"date":"2019-12-27T13:44:37","date_gmt":"2019-12-27T13:44:37","guid":{"rendered":"https:\/\/crocoblock.com\/knowledge-base\/?post_type=article&#038;p=17882"},"modified":"2023-07-28T12:29:07","modified_gmt":"2023-07-28T12:29:07","slug":"jetengine-how-to-display-switcher-values-with-dynamic-field-based-on-switcher-meta-field-type","status":"publish","type":"article","link":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-how-to-display-switcher-values-with-dynamic-field-based-on-switcher-meta-field-type\/","title":{"rendered":"How to Display Switcher Meta Field Values with the Dynamic Field Widget"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"creating-switcher-meta-field\">Creating Switcher 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<h3 class=\"wp-block-heading\" id=\"creating-a-meta-box\">Creating a meta box<\/h3>\n\n\n\n<p>Open your <strong>WordPress Dashboard<\/strong> and go <strong>JetEngine &gt; MetaBoxes<\/strong>. Click the <strong>Add New<\/strong> button to <a href=\"https:\/\/crocoblock.com\/knowledge-base\/articles\/how-to-create-a-custom-meta-field-with-jetengine-custom-meta-field-types-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\">create a meta box<\/a>.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/02\/meta-box.png\" alt=\"meta box list\">\n\n\n\n<p>In the <strong>General settings<\/strong> block, give your meta box a name and define what it will be applied to.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/02\/general-settings-meta-box.png\" alt=\"meta box general settings\">\n\n\n\n<h3 class=\"wp-block-heading\" id=\"creating-a-switcher-meta-field\"><strong>Creating a switcher meta field <\/strong><\/h3>\n\n\n\n<p>Navigate to the <strong>Meta fields<\/strong> block and create a new meta field with the <strong>Switcher Field<\/strong> type.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/02\/meta-field.png\" alt=\"switcher meta field settings\">\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"activating-switcher\">Activating Switcher<\/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>Go to the posts, where you want your switcher to be active and toggle the switcher option to <strong>Yes<\/strong>. Don\u2019t forget to click the <strong>Update<\/strong> button to save the changes.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/02\/switcher-activation.png\" alt=\"switcher activation\">\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"creating-a-listing\">Creating a Listing<\/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>Proceed to JetEngine &gt; Listings and <a href=\"https:\/\/crocoblock.com\/knowledge-base\/articles\/jetengine-listing-functionality-how-to-create-a-new-listing-to-apply-for-the-certain-post-type\/\" target=\"_blank\" rel=\"noopener noreferrer\">create a listing<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"dynamic-field-editing\"><strong>Dynamic field editing<\/strong><\/h3>\n\n\n\n<p>Find the <strong>Dynamic Filed<\/strong> in the <strong>Elementor<\/strong> panel, drag-n-drop it on the page. Go to the settings of the <strong>Dynamic Field<\/strong> widget and in the <strong>Source<\/strong> drop down select <strong>Meta data<\/strong> option. In the <strong>Meta Field<\/strong> drop down, choose the <strong>Switcher<\/strong> option.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/02\/edit-dynamic-field.png\" alt=\"edit dynamic field\">\n\n\n\n<h3 class=\"wp-block-heading\" id=\"activating-output\"><strong>Activating output<\/strong><\/h3>\n\n\n\n<p>Scroll down to the <strong>Filter field output<\/strong> option and activate it. Navigate to the <strong>Callback<\/strong> drop down and select the <strong>Switcher field values<\/strong> option. Type in the text which will be displayed if the switcher is enabled and disabled in the following fields. In our case, it is \u201c<strong>yes<\/strong>\u201d and \u201c<strong>no<\/strong>\u201d respectively. Click the <strong>Publish<\/strong> button to save the changes.<\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"displaying-the-switcher\">Displaying the Switcher<\/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>Go to the page and find the <strong>Listing Grid<\/strong> widget. Drag and drop it on the page. In the <strong>General &gt; Listing<\/strong> drop down select the one we have just created in the previous step. Make all the necessary styling changes, and that\u2019s it.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/02\/displaying-listings.png\" alt=\"displaying listings\">\n\n\n\n<p>You can see the switcher displayed on your page.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/02\/frontend-listing-with-switcher.png\" alt=\"front end listing with switcher\">\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, you will learn how to create and display a switcher custom field type values with the help of the Dynamic Field widget.<\/p>\n","protected":false},"author":11,"featured_media":0,"template":"","format":"standard","builder-category":[],"article-category":[390],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Showcasing Switcher with Dynamic Field Widget \u2014 JetEngine | Crocoblock<\/title>\n<meta name=\"description\" content=\"Find out how to display switcher value via the Dynamic Field by using a switcher meta field type.\" \/>\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\/jetengine\/jetengine-how-to-display-switcher-values-with-dynamic-field-based-on-switcher-meta-field-type\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Showcasing Switcher with Dynamic Field Widget \u2014 JetEngine | Crocoblock\" \/>\n<meta property=\"og:description\" content=\"Find out how to display switcher value via the Dynamic Field by using a switcher meta field type.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-how-to-display-switcher-values-with-dynamic-field-based-on-switcher-meta-field-type\/\" \/>\n<meta property=\"og:site_name\" content=\"Help Center\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-28T12:29:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/02\/meta-box.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\/jetengine\/jetengine-how-to-display-switcher-values-with-dynamic-field-based-on-switcher-meta-field-type\/\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-how-to-display-switcher-values-with-dynamic-field-based-on-switcher-meta-field-type\/\",\"name\":\"Showcasing Switcher with Dynamic Field Widget \u2014 JetEngine | Crocoblock\",\"isPartOf\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#website\"},\"datePublished\":\"2019-12-27T13:44:37+00:00\",\"dateModified\":\"2023-07-28T12:29:07+00:00\",\"description\":\"Find out how to display switcher value via the Dynamic Field by using a switcher meta field type.\",\"breadcrumb\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-how-to-display-switcher-values-with-dynamic-field-based-on-switcher-meta-field-type\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-how-to-display-switcher-values-with-dynamic-field-based-on-switcher-meta-field-type\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-how-to-display-switcher-values-with-dynamic-field-based-on-switcher-meta-field-type\/#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 Display Switcher Meta Field Values with the Dynamic Field Widget\"}]},{\"@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":"Showcasing Switcher with Dynamic Field Widget \u2014 JetEngine | Crocoblock","description":"Find out how to display switcher value via the Dynamic Field by using a switcher meta field type.","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\/jetengine\/jetengine-how-to-display-switcher-values-with-dynamic-field-based-on-switcher-meta-field-type\/","og_locale":"en_US","og_type":"article","og_title":"Showcasing Switcher with Dynamic Field Widget \u2014 JetEngine | Crocoblock","og_description":"Find out how to display switcher value via the Dynamic Field by using a switcher meta field type.","og_url":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-how-to-display-switcher-values-with-dynamic-field-based-on-switcher-meta-field-type\/","og_site_name":"Help Center","article_modified_time":"2023-07-28T12:29:07+00:00","og_image":[{"url":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/02\/meta-box.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\/jetengine\/jetengine-how-to-display-switcher-values-with-dynamic-field-based-on-switcher-meta-field-type\/","url":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-how-to-display-switcher-values-with-dynamic-field-based-on-switcher-meta-field-type\/","name":"Showcasing Switcher with Dynamic Field Widget \u2014 JetEngine | Crocoblock","isPartOf":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#website"},"datePublished":"2019-12-27T13:44:37+00:00","dateModified":"2023-07-28T12:29:07+00:00","description":"Find out how to display switcher value via the Dynamic Field by using a switcher meta field type.","breadcrumb":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-how-to-display-switcher-values-with-dynamic-field-based-on-switcher-meta-field-type\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-how-to-display-switcher-values-with-dynamic-field-based-on-switcher-meta-field-type\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-how-to-display-switcher-values-with-dynamic-field-based-on-switcher-meta-field-type\/#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 Display Switcher Meta Field Values with the Dynamic Field Widget"}]},{"@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\/17882"}],"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=17882"}],"wp:term":[{"taxonomy":"builder-category","embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/builder-category?post=17882"},{"taxonomy":"article-category","embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/article-category?post=17882"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}