Help Center

Repeater Custom Meta Field Overview

Repeater Custom Meta Field Overview

From this overview, you will learn about the Repeater Meta Field from the JetEngine plugin and its general settings and features.

You can use the Repeater meta field to combine multiple contents of the same type. It helps to avoid plural separate meta fields. With the Repeater meta field, you can group and collapse contents for your convenience.

For instance: 

  • A rent house with a description of facilities per floor; 
  • Tour plans where each repeater item is a day of the program of the tour;
  • Team Member experience etc.

Field Settings

Decide where you need the repeater field. You can create it for posts, custom content type items, users, options pages, and products. 

Build it by editing custom post type, custom content type, and options page, or you can create a custom meta box for users, products, etc. 

So let’s start with the main settings:

  • Label — the label you see in the back end of the post, user, etc., side by your field. It can consist of different characters;
  • Name/ID —  field name/key which will be stored in the database. It should contain only Latin letters, lower case, numbers, `-` or `_` as symbols;
  • Object type — here, “Field” should be selected;
  • Field type — the list of available fields. Pick the “Repeater” option;

Press the “New Repeater Field” button to add repeater item fields. Here, you can read about meta field types.

new repeater item field types

Rules for the Label and Name are the same. Now, let’s look at the following repeater settings.

  • Collapsed — toggle this option to collapse repeater item fields on the page load;
collapsed repeater item fields
  • Title Field — pick a repeater item field to show as a repeater item title (the one you created as a nested meta field);
  • Description — add a small description for your convenience or for other users who will have access to the website’s back end;
  • Is Required — switcher that defines whether its field is required to create/update post/user/item; 
  • Show in Rest API — toggle to be activated to make this field visible with WordPress Rest API and available to edit.
  • Conditional Logic — set meta field display rules.

Now click the “Save Changes” button and navigate to the source of your Repeater field. In the described case, it’s User experience. Click the “New Item” button to see your fields and create as many items as you need.

Repeater Meta Field Sources

The Repeater field is saved as an array and requires specific display methods.

For example, filled-in repeater meta field:

repeater item fields with content

Repeater meta field PHP value: repeater value is an associative array with keys like “item-0”, “item-1”, etc., and values being an array of repeater item fields.

serialized repeater item content

The Repeater field is also serialized to be stored in the Database.

repeater item content in a database

Check the front-end view.

repeater field content on front-end

Options for Displaying Repeater Field

There are several ways you can display content from the Repeater meta field:

selected repeater query as the source for the accordion widget

That’s all; now you know how the repeater meta field can be used, stored, and displayed on your WordPress website with the JetEngine plugin.

Was this article helpful?

Need help?

Ask Facebook community

Get answers from 22K Crocoblock Community experts from all over the world.

Start a live chat

Ask question to support agent and share its details via chat messages.