-
Notifications
You must be signed in to change notification settings - Fork 123
Repeatable Fields
Matthew Haines-Young edited this page Sep 24, 2013
·
8 revisions
Any field can be made repeatable. This means that an editor clone the field to enter multiple meta values for the same field.
To create a repeatable field, set 'repeatable' => true
when defining field args.
Repeatable fields are stored as multiple meta entries using the same key.
// Note 3rd param is false to retrieve all meta entries with the same key (Default is false)
$field_data = get_post_meta( get_the_id(), 'example_repeatable_field', false );
foreach ( $field_data as $single_field )
echo $single_field;
- Setup/Install Custom Meta Boxes
- Creating a custom meta box
- Displaying Field Data
- Optional Generic Field Args
- Repeatable Fields
General
- Text Field
- Small Text Field
- Number Field
- URL Field
- Textarea Field
- Code Field
- Select Field
- Checkbox Input Field
- Radio Input Field
Date & Time
WordPress
Media
Utilities