The CSV Importer Pro is an advanced tool to import/update your posts, pages, custom posts, and custom fields. The file can be any format like CSV, XML, or Excel. This plugin is compatible with both ACF Free and Advanced Custom Fields Pro. Install or buy the ACF and CSV importer plugin for the seamless data import/update of custom posts and custom fields.
Before ACF imports CSV of posts and fields, it is important to remember that, we have to create custom posts and custom fields in ACF. All the custom fields are assigned to their appropriate custom posts. Now let’s see how to import Advanced Custom fields (ACF) as CSV/XML.
Supported Modules
Posts | Pages | Custom Posts | Users |
Event | Location | Recurring Events | Woocommerce |
Woocommerce Attributes | Woocommerce Categories | Woocommerce Tags | WP eCommerce |
Tags | Categories | Custom Reviews | Taxonomies |
ACF Import #
You can create as many custom fields based on your requirement.
Step 1: Browse the file to import -CSV/XML of custom post type #
Navigate to WP CSV Importer Pro and select the Import/Update option. Browse the desired advanced custom fields CSV/XML/Excel file
Now click on Continue and select the content type
Here, we need to import the custom post types of ACF. So select the desired custom post type from the dropdown.
Step 2: Select the Action as Import or Update #
Once you select the file type,
- Select the option Update Content for data update
- Select the option Fresh Import for the data import. ( ACF import Data)
Step 3: Map the fields #
For updating the posts, the existing mapping template will be displayed. You can easily update the mapping of the desired fields.
For importing new posts, you need to map all the WP fields concerning the CSV headers. ACF import add-on has two types of Mapping. You can choose any mapping based on your convenience.
Advanced method- Mapping the WP- fields with the desired CSV header from the drop-down.
Drag and drop method- Map the fields by dragging the appropriate CSV header fields and drop them in the corresponding WP core fields.
As it was an Advanced Custom Fields import, you must Map the ACF Pro fields.
Once done with the Mapping, provide the unique name for the mapping template and click on Save Mapping.
Step 4: Run the importer #
Now configure the Import settings. With the WP CSV importer Pro, it is flexible to choose backup before import, Switch on maintenance mode while importing, handle duplicates on existing records, and Schedule the import based on your business needs. Finally, click on Import.
Now your ACF custom post types have been successfully imported along with its custom fields.
For a more detailed explanation of the Import process, please refer here.
Advanced Custom Fields #
Click here to download the ACF CSV sample File for trying test import. The below table lists all the ACF field format values that are helpful in preparing a proper CSV file.
ACF Fields | Description & CSV Values | CSV Sample Value |
---|---|---|
Text | Add your single line text. | WP Ultimate CSV Importer |
Text Area | Add your paragraph with multiple lines. | WP Ultimate CSV Importer lets you import or update your WordPress website content from any CSV/XML file. |
Number | Any numeric value. | 769837219 |
Range | Specific your range value | 100 |
Use the standard email format with @ and dot representation. | [email protected] | |
URL | Specify your URL. (Page URL, Post URL or any external URL) | https://www.smackcoders.com/wp-ultimate-csv-importer-pro.html |
Password | Add your own password with any value. | 35aw@NG!jfj9ftn |
Wysiwyg Editor | Any type of text values are supported | WP Ultimate CSV Importer * Import/ Update * Instant/ Scheduled import |
Image | Mention the image path of your WordPress media gallery or any publicly accessible External URL. | https://cdn.smackcoders.com/wp-content/uploads/2023/11/software-developments-services.webp |
File | Specify the file path in your WordPress Media gallery. External URL are not supported. | – |
oEmbed | Mention your youtube video URL | https://www.youtube.com/embed/0UBu_vBQyhY?si=dlLYWjSfU3IUOuZq |
Gallery | Specify your WordPress Media URL or any publicly accessible external URL. Multiple images are separated using a Comma separator. | https://cdn.smackcoders.com/wp-content/uploads/2023/11/software-developments-services.webp,https://cdn.smackcoders.com/wp-content/uploads/2021/07/how-to-build-develop-WordPress-Websites.webp,https://cdn.smackcoders.com/wp-content/uploads/2023/11/Vtiger-Subscription-Module-logo.webp |
Select | Provide the values of your select option to select the desired one. Multiple values are selected by using Comma(,) separation Ex: Gold Silver Platinum Diamond | Silver,Gold,Diamond |
Checkbox | Provide the checkbox values in your CSV file. To enable multiple checkboxes provide the values in Comma(,) separation. Ex: Yellow Blue Green Red | Yellow,Blue,Red |
Radio Button | Specify the radio button value to be selected. Ex: Yellow Blue Green | Blue |
Button Group | Specify the button value to be selected. Ex: Medium Small Large | Small |
True/ False | Specify the desired value True – 1 False – 0 | 1 |
Link | Specify your Post or Page or any external link. | https://www.smackcoders.com/wp-ultimate-csv-importer-pro.html |
Page Link | Specify your WordPress page URL. Mention multiple pages using a Comma(,) separator. | |
Post Object | Specify the Post ID. Multiple values are separated in Comma(,) separation. | 356,598.870 |
Relationship | Relate multiple posts by mentioning the Post ID in Comma(,) separation. | 345,466,897 |
Taxonomy | Specify your Terms & taxonomies ID in your CSV. For Multiple values use comma(,) separator. | 86,38,63 |
User | Mention your User ID. To assign multiple users, mention the ID in Comma(,) separation. | 567,379,648 |
Google Map | Specify your exact geo location with Geo Codes. | Smackcoders Inc, Palayamkottai, Tirunelveli, Tamil Nadu, India|8.7149916|77.73236250000002. |
Date Picker | Mention the date value in standard format. DD/MM/YYYY | 25/09/2018 |
Date time Picker | Specify the date(DD/MM/YYYY) and time(HH/MM/SS). | 25/09/2018 05:18pm |
Color Picker | Mention your color code(HEX Code). | #0000ff |
ACF Repeater Fields #
The ACF repeater fields allow you to create a set of subfields that come up repeatedly. This is used when you have to create and manage very customized data. Repeater Field Sample CSV File. With WordPress Ultimate CSV Importer you can import any Repeater values of ACF. You can easily separate the repeater values using the Pipeline(|) separator. Ex: Let’s repeat Text(Car Name) & Radio button(Fuel type – Petrol or Diesel) Values.
- Q5 35 TDI Premium Plus – Petrol
- A6 35 TDI Matrix – Diesel
- Q7 45 TDI Quattro Technology – Diesel
Along with your post details add two additional columns in your CSV file – one for Car Name & other for Fuel Type. Now mention the values in the pipeline separator.
- Car Name – Q5 35 TDI Premium Plus|A6 35 TDI Matrix|Q7 45 TDI Quattro Technology
- Fuel Type – Petrol|Diesel|Diesel
Repeater of Repeater ACF fields #
Repeater acts as a parent for subfields. The repeater provides a neat solution for repeating contents like team members, and CTA. The WP CSV Importer allows you to import the Repeater of Repeater ACF field values. The values are separated using -> (hyphen & less than) and | (Pipeline). Eg: Repeater field (Model Name – Q5,A6,Q7) Repeater of Repeater(Car Name – Q5 35 TDI Premium Plus, Q5 35 TDI Technology,A6 35 TDI Matrix,A6 35 TFSI Matrix,Q7 45 TDI Quattro Technology,Q7 45 TDI Design Edition). After adding your necessary post information, add two additional columns in your CSV,
- Models – Q5|A6|Q7
- Cars – Q5 35 TDI Premium Plus->Q5 35 TDI Technology|A6 35 TDI Matrix->A6 35 TFSI Matrix|Q7 45 TDI Quattro Technology->Q7 45 TDI Design Edition.
Update WordPress data with ACF Fields #
This plugin lets you update the existing WordPress fields with the help of ACF custom fields. Once you upload your CSV/XML file, click the Update Content option. Then choose your post_type from the dropdown. The data update is done based on the text or number field. So while you’re in the import section, enable the Do you want to update the records based on ACF Fields? option and enter the name of the text or number field.
The update will be done based on the ACF field name you have entered.
Note: The Field Mapping follow the same procedure you do for import.
ACF Flexible Content Field import and export #
ACF flexible content field is a block-based editor designed with layouts and sub-fields. You can import and export flexible content field data as CSV/XML along with the other fields and assigned post types like pages, posts, or custom posts using the CSV Importer Pro plugin.
Import Flexible Content Field into WordPress #
To import flexible content field data into your website, all you first need to do is prepare a proper CSV/XML file. If you want to prepare a CSV file to import, follow the field value format to give inside CSV in the below table. The table shows a reference for one flexible content field with two layouts.
ACF Fields | Description & CSV Values | CSV Sample Value |
---|---|---|
Text | Specify text values. To specify text values for multiple layouts, separate values with a pipeline separator. | Text Field label1|Text Field label2 |
Textarea | To include values for textarea fields in multiple layouts, separate each layout value with pipelines. | Textarea content 1|Textarea content 1a |
Number | Provide numeric values for many layouts’ number fields | 190|180 |
Range | Specify range values. Separate multiple layout values using a pipeline. | 83|50 |
Enter mail address here. | [email protected]|[email protected] | |
URL | Include page, post, or any external URL. Provide a pipeline to separate URLs to include in multiple layouts. | https://www.smackcoders.com/documentation/wp-ultimate-csv-importer-pro/how-to-import-csv|https://www.smackcoders.com/documentation/ultimate-csv-importer-pro/how-to-import-json |
Password | Give a password including special characters, alphabets, and numbers. | admin123|pwd123 |
Image | Give your WordPress site a media image URL or any external image URL. Separate multiple layout image field values with pipelines. | https://cdn.smackcoders.com/wp-content/uploads/2023/11/software-developments-services.webp|https://cdn.smackcoders.com/wp-content/uploads/2023/11/Vtiger-Subscription-Module-logo.webp |
File | Supports only the file path of your media library. | http://localhost/wordpress5811/wp-content/uploads/2022/03/Post.csv|http://localhost/wordpress5811/wp-content/uploads/2022/02/CMS-138.jpg |
Wysiwyg editor | Add any type of text values in this field. | You can write your WYSIWYG editor content here1|You can write your WYSIWYG editor content here2 |
oEmbed | Provide any youtube URL. Use pipelines to separate the values of different layouts. | https://www.youtube.com/embed/ace9-MDBNhs?si=lYNXOiqc3cfA-b9F|https://www.youtube.com/embed/O9hVc0SRSuc?si=X9FFfECnjw4whZI6 |
Gallery | Mention WordPress media URLs or external URLs in comma separator. If you want to add gallery images for many layouts then separate each layout value with a pipeline. | https://cdn.smackcoders.com/wp-content/uploads/2023/11/software-developments-services.webp,https://cdn.smackcoders.com/wp-content/uploads/2023/11/suitecrm-migration-guide.webp|https://cdn.smackcoders.com/wp-content/uploads/2023/11/Blockchain-in-government-E-Voting.webp,https://cdn.smackcoders.com/wp-content/uploads/2023/11/blockchain-technology.webp,https://cdn.smackcoders.com/wp-content/uploads/2023/11/Blockchain-In-Insurance-IOT.webp |
Select | Provide values for the select field. Use a comma separator for separating multiple select values and to separate multiple select block values including a pipeline. | one,two|two |
Checkbox | Mention the checkbox values and separate multiple values with commas. Separate multiple checkbox field values using the pipeline to include inside many layouts. | red,green|red |
Radio Button | Mention radio button values for many blocks separated with a pipeline. | male|female |
Button Group | Specify the value for the button to select. | small|medium |
True/ False | Specify 1 to select true and 0 for false. | 1|0 |
Link | Mention your post, page, or external URL. | https://www.smackcoders.com/documentation/wp-ultimate-csv-importer-pro/how-to-import-csv|https://www.smackcoders.com/documentation/ultimate-csv-importer-pro/how-to-import-csv-xml |
Post Object | Mention the titles of your posts in comma separator. Specify the post values for multiple blocks with pipelines. | Blog Post-1|Blog Post-3 |
Page Link | Specify your page URLs. | https://www.smackcoders.com/documentation/wp-ultimate-csv-importer-pro/how-to-import-csv|https://www.smackcoders.com/documentation/ultimate-csv-importer-pro/how-to-import-csv |
Relationship | Mention multiple posts titles to relate. | Blog Post1, Blog Post2|Blog Post5, Blog Post3 |
Taxonomy | Specify taxonomies names | category1,catefory6|category3 |
User | Mention user IDs here. | 1,3|2,3 |
Date Picker | Enter the date values. | 20220317|20220318 |
Datetime Picker | Specify the date time value. | 2022-03-04 00:00:00|2022-03-24 00:15:00 |
Time Picker | Mention time value in the defined format. | 00:00:00|16:00:00 |
Color Picker | Specify the colors hex value. | #eeee22|#969696 |
In your CSV file, you also need to mention the layouts you want to fill values like this.
flexible content | Mention the layouts in comma separator. | flex_label,flex_label |
Here ‘flexible content’ is the field name, and ‘flex_label’ is the layout name. After you prepare the CSV, follow the upcoming steps to import it into WordPress.
- Upload the CSV in the CSV Importer plugin and select the post type from the dropdown.
- Then map the CSV fields using ‘advanced mode’ or ‘drag & drop mode’. Map all the fields in the ACF Flexible Fields widget.
- Move to the next step.
- Click Import to import CSV instantly. To know more about importing and scheduling the import, refer to the Import and Schedule CSV data documentation.
Export Flexible Content Field data #
You can export ACF flexible content field data along with Posts, Pages, or Custom Posts data export. Now let’s see about how to export ACF data. To export flexible content field data,
- Move to the Export tab and select the post type which can be Pages, Posts, Custom Posts, or Advanced Custom fields for WooCommerce.
- If you select Custom Posts, select one Custom Post name from the beside dropdown.
- Give a name for the file to export and select one file type.
- Configure advanced filter. To know more about this, refer to our export data with CSV Importer documentation.
- Click Export.
- After the file is ready to export. Click download to save the backup on your local desktop.
Other Links
Frequently Asked Questions (FAQ) #
How do I add ACF to WordPress?
To add ACF to WordPress,
- Install and activate the ACF plugin
- Create custom post types and custom field groups
- Assign the posts to their appropriate custom fields that were created
- Prepare the CSV file for acf import of custom post types
- Import ACF custom posts and fields with the WP CSV Importer Pro Plugin
How do I fetch ACF data in WordPress?
To fetch Advanced Custom Fields (ACF) data in WordPress, you can use the get_field() function provided by the ACF plugin. This function retrieves the value of a specific field assigned to the current post or a specified post.
Here’s how you can use get_field():
<?php
// Get a single value from a specific field
$custom_field_value = get_field(‘field_name’);
// Get a single value from a specific field for a specific post
$custom_field_value = get_field(‘field_name’, $post_id);
// Get multiple values from a repeater field
$repeater_field_values = get_field(‘repeater_field_name’);
// Get multiple values from a repeater field for a specific post
$repeater_field_values = get_field(‘repeater_field_name’, $post_id);
// Example usage in a loop
if (have_posts()) :
while (have_posts()) :
the_post();
$custom_field_value = get_field(‘field_name’);
// Display or manipulate the retrieved value
endwhile;
endif;
?>
Replace the term ‘field_name’ with the name or key of your ACF field and $post_id with the ID of the post from which you want to retrieve the custom field data. If you omit $post_id, it will default to the current post in the WordPress Loop.
You can use this method in your theme files such as single.php, and page.php, or even in your template parts like header.php or footer.php to display custom field data wherever you need it.
What to do if your ACF import file is empty?
If you got an error on the ACF import file as empty,
Navigate to the browser inspector and search for the term <form method=” post”>
Replace it with <form method=”post” enctype=”multipart/form-data”>
Or Ensure your ACF file (JSON file ) has any syntax errors such as Comma (,) at the end of the file
Where is ACF data saved?
In Advanced Custom Fields (ACF), the data is saved as custom fields in the WordPress database. ACF provides an interface for creating and managing custom fields, and these fields are associated with specific posts or pages. When you add data to these fields via the WordPress admin interface, it gets saved in the wp_postmeta table of your WordPress database.
What is the return format for the ACF gallery?
By default, when you create a gallery field in ACF, the return format is an array of image IDs. However, you can customize the return format to suit your business needs. For example, you can choose to return the URLs of the images instead of the IDs. This can be configured when you set up the ACF field in the WordPress admin panel.
How do I get an image field in ACF?
To get the value of an image field in ACF, you can use the get_field() function. If you want to retrieve the URL of the image, you would typically set the return format of the image field to “Image URL” in the ACF field settings. Then, you can use get_field(‘image_field_name’) to get the URL of the image.
Example:
<?php
$image_url = get_field(‘image_field_name’);
echo ‘<img src=”‘ . $image_url . ‘” alt=”Image”>’;
?>
Replace ‘image_field_name’ with the name or key of your ACF image field.
Remember to replace the term ‘image_field_name’ with the actual name or key of your ACF image field. This will retrieve the URL of the image, which you can then use to display the image in your WordPress theme.
How to export Custom Fields in WordPress?
- The WP CSV importer supports both import and export ACF fields(custom fields).
- Navigate to the importer plugin- >Export
- Choose the option custom posts and then select the desired custom posts from the dropdown menu.
- Click on Export.
- All the custom posts and their related custom fields will be exported. In this way, you can export custom fields in WordPress.
List the fields of ACF that the CSV importer Plugin supports
The CSV importer supports all the below fields of ACF.
Repeater Field:
Automate repeating a section with the same set of subfields with ACF repeater fields. Automation of repeating a section inserts the data in each field type. If the inserted field type has multiple values, you can separate it. Just mention
the value in comma(,) separation or pipeline(|) separation.
For Example:
If one of the field types is a checkbox and the field name is color. Then, you can have the header as a color to automap and the value as blue, black, red, or blue|black|red
Taxonomy Field:
Create an ACF taxonomy field and assign it to the taxonomy values. The values can be a comma(,) or pipeline(|) separation. Create a new taxonomy, if the value of the taxonomy doesn’t exist then the new taxonomy and assigned to the Post or Page.
Relationship Field:
Advanced linking links multiple Pages or Posts with other Post types. It can import related multiple post-object data. You can mention the related Post or Page ID. Use the comma(,) separation with the field name as the header in your CSV file. It relates the CSV file with the created ACF field automatically.
Gallery Fields:
Now you can import your photos or gallery field images. Import from the WordPress media library or the external image URL. You can specify the URL in comma(,) separation in your CSV with the field name as the header to automap the field. For the image in the media library, you can also specify the media ID.
WP Ultimate CSV Importer Pro
Get Ultimate CSV/XML Importer to import data on WordPress faster, quicker and safer.