Creating Switcher Meta Field
1 Step — Creating a Meta Box
Open your WordPress Dashboard and go JetEngine > MetaBoxes. Click the Add New button to create a meta box.
In the General settings block, give your meta box a name and define what it will be applied to.
2 Step — Creating a Switcher Meta Field
Navigate to the Meta fields block and create a new meta field with the Switcher Field type.
Go to the posts, where you want your switcher to be active and toggle the switcher option to Yes. Don’t forget to click the Update button to save the changes.
Creating a listing
Proceed to JetEngine > Listings and create a listing.
1 Step — Dynamic Field Editing
Find the Dynamic Filed in the Elementor panel, drag-n-drop it on the page. Go to the settings of the Dynamic Field widget and in the Source drop down select Meta data option. In the Meta Field drop down, choose the Switcher option.
2 Step — Activating Output
Scroll down to the Filter field output option and activate it. Navigate to the Callback drop down and select the Switcher field values 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 “yes” and “no” respectively. Click the Publish button to save the changes.
Displaying the switcher
Go to the page and find the Listing Grid widget. Drag and drop it on the page. In the General > Listing drop down select the one we have just created in the previous step. Make all the necessary styling changes and that’s it!
You can see the switcher displayed on your page.