Article Overview
- Category: Custom Fields, Data Modeling & Relational Architecture
- Audience: WordPress Developers, Theme Engineers & Enterprise Agencies
- Applies To: NextGen Smart Data Importer (Community Free & Enterprise Pro Editions)
- Purpose: Technical guide for mapping and importing structured data into Advanced Custom Fields (ACF), Meta Box, Pods, and JetEngine, including Repeaters, Flexible Content, Gallery arrays, and Post Objects.
1. Executive Summary
Modern WordPress sites rely heavily on custom field frameworks to power real estate listings, directories, recipe blogs, portfolio case studies, and corporate intranets.
Importing into these plugins is notoriously difficult because they do not store simple flat postmeta. Instead, they require:
- Hidden Field Key References (
_field_12345): Without the matching field key reference, ACF will not render the field in the WordPress Admin! - Repeater Index Counters (
field_name_0_subfield,field_name_1_subfield): Multi-row repeater structures must store an integer row count and indexed child keys. - Serialized PHP Arrays & JSON Objects: Complex layout blocks in ACF Flexible Content or Meta Box cloneable groups require exact internal serialization.
NextGen Smart Data Importer auto-detects installed custom field plugins, inspects their schema, and handles all hidden key injection and serialization behind the scenes.
2. Supported Custom Field Frameworks
3. How to Format ACF Repeaters & Complex Fields
ACF Repeater Formatting Convention
To import multiple items into an ACF Repeater (such as product specifications, hotel amenities, or timeline events):
Option 1: Pipe-Separated Values (Simple Repeaters)
If an ACF Repeater named specifications contains two subfields (spec_label and spec_value), format your CSV columns as:
spec_label:Screen Size | Battery Life | Weightspec_value:6.7 inches | 24 Hours | 185g
NextGen matches the pipes index-for-index and automatically populates:
specifications = 3 (Total row count)
specifications_0_spec_label = "Screen Size"
specifications_0_spec_value = "6.7 inches"
specifications_1_spec_label = "Battery Life"
specifications_1_spec_value = "24 Hours"
specifications_2_spec_label = "Weight"
specifications_2_spec_value = "185g"Option 2: JSON-Encoded Array (Advanced Repeaters)
For multi-nested repeaters, pass a valid JSON string in the cell:
[
{"spec_label": "Screen Size", "spec_value": "6.7 inches"},
{"spec_label": "Battery Life", "spec_value": "24 Hours"}
]4. Automatic ACF Field Key Injection
In ACF, every custom field requires two records in wp_postmeta:
- The value record:
meta_key = 'property_price',meta_value = '450000' - The field key record:
meta_key = '_property_price',meta_value = 'field_63f91a2bc8'
DATABASE POSTMETA VIEW:
┌─────────┬───────────────────┬────────────────────────────────────────┐
│ post_id │ meta_key │ meta_value │
├─────────┼───────────────────┼────────────────────────────────────────┤
│ 1042 │ property_price │ 450000 │
│ 1042 │ _property_price │ field_63f91a2bc8 (Auto-injected by AGY)│
└─────────┴───────────────────┴────────────────────────────────────────┘Why this matters: If a legacy importer omits
_property_price, WordPress will save the value in the database, but ACF will show an empty input field when you open the edit screen. NextGen always queriesacf_get_field()and guarantees the companion field key is inserted.
5. Developer Filter: nextgen_importer_custom_field_value
Developers can intercept and transform custom field data before it is saved into ACF or Meta Box:
add_filter('nextgen_importer_custom_field_value', function ($value, $field_key, $field_type, $post_id) {
// Automatically sanitize and hash secret API keys in custom fields
if ($field_key === 'client_api_token') {
return wp_hash($value);
}
return $value;
}, 10, 4);6. Frequently Asked Questions (FAQ)
Q: Does NextGen support ACF Relationship & Post Object fields?
Yes. You can map comma-separated Post IDs (102, 105, 108), Post Slugs (blue-jacket, red-jacket), or Titles (Men's Classic Bomber). NextGen resolves the slugs or titles to their matching Post IDs automatically.
Q: Can I import images directly into ACF Image and Gallery fields?
Yes. Provide external image URLs in your spreadsheet. NextGen downloads the files into the WordPress Media Library, creates the attachment records, and stores the attachment ID (or image array) in the ACF field.