Our ACF Import Add-On for WP All Import provides three modes for importing to repeater fields. The preferred option depends on the type of file you are using, as well as the way your data is structured.
Note About Importing From Several Records
Importing data from several records into a repeater field for a single post is not supported. All of the data for a repeater field must be present in the same record.
For example, the data in the “Sizes” column in this file can be imported into a repeater field because the data is in the same record:
However, the data in the “Sizes” column in this next file cannot be imported as desired, since the data is spread out across several records:
Depending on the import settings, either a separate post would be created for each row, or only the “Large” value would be present in the repeater field for “Test Post” (since the prior values that were imported would be overwritten).
Mode 1: Fixed Repeater Mode
Use Fixed Repeater Mode when each piece of your repeating data is stored in separate columns or elements. For example, if you have a repeater field containing an image, and your CSV file has five columns – image_1, image_2, image_3, etc:
Then you should use Fixed Repeater Mode. Manually add five rows to the repeater by clicking Add Row:
Then drag & drop image_1 to the first row, image_2 to the second row, etc.
Check the Ignore blank fields box if some of the records in your file don’t contain values for all five images. For example, if image_3 and onwards are blank for a certain record, WP All Import will only add two rows to the repeater for that record.
Mode 2: Variable Repeater Mode (XML)
Use this option if your repeating data is stored in XML format as “sibling” elements, for example:
Dragging & dropping won’t generate the correct XPath expressions when using Variable Repeater Mode (XML). You need to modify your XPath expressions as per WP All Import's FOREACH syntax.
If you'd like to learn more, check this video where “Variable Repeater Mode (XML)” is used.
Mode 3: Variable Repeater Mode (CSV)
If your repeating data is stored in a single column in your CSV file and is separated by a separator character, use this option.
For example, if you have a repeater field containing ingredients (Name and Measure – i.e., 1/2 cup is the measure and butter is the name), and the names & measures are stored in separate columns in your CSV file:
Then use this option. Since this repeater data is comma-separated, change the Separator Character setting from a pipe character to a comma, and drag & drop the name & measure columns into the appropriate sub-fields in the repeater field. The end result should look like this:
When this data is imported, the first item in the name column will be associated with the first item in the measure column, the 2nd item in the name column with the 2nd in the measure column, etc.
Frequently Asked Questions
What Add-Ons Do I Need to Import ACF Repeater Fields?
To import ACF repeater fields, you need to have the ACF Import Add-On active on your site along with WP All Import.
Learn how to import Advanced Custom Fields using WP All Import.
Learn more about exporting Advanced Custom Fields with WP All Export.
Shows you how to use PHP functions or custom PHP functions during import.