- What is a Meta Field?
- Meta Field settings
- Other Parameters of Meta Fields
We’ll explore the settings of custom meta fields made with the JetEngine plugin and take a closer look at the types of these fields.
What is a Meta Field?
Custom Meta Fields display additional information about your custom or default post. In the default state of the post, that metadata isn’t visible for the visitors of the website. You can display it only with the help of the Dynamic widgets. However, the information you type into the meta fields can be used in various places and not only once.
Meta Fields can be added to the Custom Post Type or to the Meta Box. In each of the cases, they are placed into a Meta Fields block.
Meta Field settings
- Label – type in the title of the field here. This is how it will be shown to you and other users furtherly.
- Name/ID – this value is generated automatically, according to the text you put into the Label bar. If you want to change it, keep in mind that the ID shouldn’t include spaces and make sure it consists only of the letters and numbers. The auto-fill will also add a random number to the name if it is not unique. The fields with similar IDs could confuse you and cause some trouble if you’d like to use them somewhere else. That’s why the auto-fill prevents the usage of similar IDs. By the way, if you’ll choose to fill the Label bar with Cyrillic letters – the auto-fill will transliterate it to English.
- Object type: Field – here you can choose the type of the object. The Field option means that you will be able to add values there. Tab, Accordion, and Endpoint will create a specific layout.
Meta Field Types
Select the type of the custom meta field from the dropdown in the Field type option below. Let’s find out the meaning of each type.
If you want to add an extra field with custom text to the post type this type perfectly meets your requirements. You can add additional information about posts using this field. Also, you can specify the available number of characters in the field.
Provide information about the date of events, meetings, conferences with the help of this meta field. You can also save the date as a timestamp to allow to query posts by it.
This is an appropriate type for adding a time marker for posts. Add the particular time of events, meetings, and conferences in this meta field.
This custom eta field allows picking date and time in the same place in a convenient way.
You can use this type for adding a textual area to the posts with the arrangement of the text line by line. Moreover, you can set the character limit for this field value.
Selecting this type you will add a basic editor in the custom field for adding content with a certain layout and customizing its appearance directly in the WP Dashboard.
You can add a toggle as a custom field to posts, products, events, etc., which allows you to turn on/ off the appropriate option in the meta field block.
This type provides an opportunity to add checkboxes with different options for choosing to default and custom posts.
Create a meta box with an icon picker, where you will be able to pick an appropriate icon for the posts.
This type will assist in adding media files, images in particular, to the posts.
With the help of this meta field type, you will be able to add multiple images to the posts and products in a gallery form.
Radio type is perfect for adding radio options for choosing by editing default and custom posts.
This type will help add the repeating content block for every post, product, event, etc., which you will be able to fill with value in the WP Dashboard.
Use this content type to add a dropdown selector for the post. In case, you enable Allow to select multiple values options you will be able to select several options at once. This value can be also shown using the proper callback for the Dynamic Field.
If you need a field that is filled with numbers only – this will be a perfect one.
You will add a color picker tool for the posts choosing this type of meta field.
This type will allow setting and displaying related posts from the WP Dashboard. To do that one needs to use Related posts list callback in the Dynamic Field widget, added to a listing.
You can add some custom HTML code to your meta fields with this type if you need it. It will be useful for the unique features or types of data not presented in the list. It won’t be visible in the WP Dashboard, only in the meta fields editing page.
Custom Values in Checkbox and Radio Field Types
When you choose the Checkbox or Radio meta field types, there are two additional options that appear: Allow Custom and Get options from the glossary.
This option allows adding custom values to those fields, saving them to a database of the current post but without saving it to the default values list. Here’s how this recently added custom value looks in the Custom Post. Add the value by enabling the toggle and specifying the value itself.
Allow Custom option lets adding different custom values to different Posts. That means, that you can create different custom values for each Post.
However, if you want those custom values to be applied to all the posts in the Custom Post Type, use the Save Custom option. Therefore, all your Posts will contain this new value of the Checkbox field.
Get options from the glossary
If you turn this toggle on, it will allow you to add the options from the Glossaries to the list. You will be able to specify the concrete glossary. You will find more details about this feature in the Glossaries functionality overview.
Save as array
When this option is enabled the checked values will be stored as a plain PHP array. You need to use this option if you will edit this field in the form on the front-end. If you won’t enable the Save as array option, then the field won’t be pre-filled in the form.
Other Parameters of Meta Fields
There are the Description and Field width lines, where you can add necessary additional text for the meta field and set the meta field width.
You can specify the Character limit and determine the Default value for the current field. Moreover, it is possible to enable the Is required option to make the field required.
Conditional Logic gives you an opportunity to make fields visible only if come conditions are met. More details about how this feature works you can find in the Conditional Logic tutorial.
After you have added as many meta fields as you need, click the “Update Meta Box” button in order to save the changes.
You’re free to display the content you’ve added into the custom meta fields using Elementor in the listings and Single post templates.