---
title: "Import ACF Relationship and Post Object Fields from CSV"
url: "https://wpimportexport.com/import-acf-relationship-post-object-fields-csv/"
description: "Fill ACF Relationship and Post Object fields from a CSV file with post titles, slugs or links, even for posts created by the same import."
type: post
published: 2026-11-25T11:00:00+00:00
modified: 2026-11-26T14:59:03+00:00
categories: ["Import Guides", "Tutorials"]
tags: ["CSV import", "Import Export by RockStarLab"]
docs_topics: ["Data, formats and functions", "Import guides"]
---

# Import ACF Relationship and Post Object Fields from CSV

ACF Relationship and Post Object fields store post IDs. A spreadsheet doesn’t know the IDs of your site, and the IDs of another site are useless here. **Import Export by RockStarLab** lets you fill these fields from a CSV file with the titles, slugs or links of the posts, even posts that are created by the same file.

**Free:** importing posts with ACF fields is in the free plugin. Use version 2.2.1 or newer: it also finds drafts by their slug.

## The fields and the file

Our site has an ACF field group **Trail Guide** on posts with two fields:

- **Related Guides** (`related_guides`): a Relationship field that allows posts.
- **Visitor Info Page** (`visitor_info_page`): a Post Object field that allows pages.

The file adds three trail guides. Each names its related guides and its info page in a different way:

![CSV preview with Title, Content, Related Guides and Visitor Info Page columns using titles and slugs](https://wpimportexport.com/wp-content/uploads/2026/11/01-file-preview-1.webp)

_Related posts named by title or slug._

- **Titles** separated by `|`: `Riverside Weekend Guide|Lake Shore Walk`. Lake Shore Walk is the next row of the same file.
- **A title of an earlier row**: `Ridge Loop Trail`.
- **Slugs** separated by commas: `ridge-loop-trail, lake-shore-walk`.
- The page by its title: `Riverside Visitor Information`.

Post IDs and full post URLs work too.

## Step 1: Upload and map

Open **Import Export → Import**, choose **Posts**, upload the file and click **Auto Map**. Columns named like the field labels go to the ACF fields (`acf_related_guides`, `acf_visitor_info_page`):

![Mapped fields Related Guides to acf_related_guides and Visitor Info Page to acf_visitor_info_page](https://wpimportexport.com/wp-content/uploads/2026/11/02-mapping-13.webp)

_Auto Map sends the columns to the ACF fields._

If a column has another name, drag it to the ACF field in the WordPress fields list.

## Step 2: Import

Click **Next Step** and **Start Import**. Our 3 posts were created in a second. Without a Status column they are drafts, which is a good way to check them before publishing.

## Step 3: Check the fields

Open a post. The Trail Guide box of Forest Canopy Path, whose file row gave two slugs, lists both guides and the info page:

![ACF Trail Guide box with Related Guides Ridge Loop Trail and Lake Shore Walk and Visitor Info Page Riverside Visitor Information](https://wpimportexport.com/wp-content/uploads/2026/11/03-acf-fields.webp)

_The fields of an imported post._

The other two guides got their related posts as well, including Lake Shore Walk, which did not exist yet when the first row was imported: the plugin remembers such references and fills them in when the post is created.

## How names are matched

- An **ID** is used when that post exists and has an allowed post type.
- A **URL** is matched to the post with that address.
- Otherwise the value is looked up as a **slug**, then as a **title**. Drafts have no slug yet, so their slug is worked out from the title.
- Only the post types allowed in the field settings are searched. A Visitor Info Page field limited to pages doesn’t pick a post with the same title.
- A Relationship field and a Post Object field with **Select Multiple** take several values separated by `|` or commas. Use `|` when titles contain commas.
- A value that matches nothing leaves the field empty. If the post is imported later, the field is filled in then.

## Tips

- **Titles must be unique.** If two posts have the same title, use slugs or IDs.
- **Update existing posts.** To set the fields of posts that already exist, add a column with the slug or ID, set **Check for Existing Items by Field** to it and **If Match Found** to **Update**.
- **Between sites.** To move posts with their relationships to another site, see [ACF relationship fields that break after an import](https://wpimportexport.com/acf-relationship-fields-break-after-import/).

An import creates and changes posts. [Back up the site](https://wpimportexport.com/how-to-create-a-wordpress-website-backup-and-restore-it/) first, or ask your AI agent to start the backup.

## With an AI agent

An AI agent connected to the site through the WordPress MCP Adapter (see [connecting Claude Code to WordPress](https://wpimportexport.com/connect-claude-code-to-wordpress-mcp/)) can run the same import:

Without the plugin, WordPress 7.1.5 gives a connected agent only three read-only abilities for site, user and environment information. The exports, imports and syncs in the requests below are abilities of Import Export by RockStarLab.

```
With Import Export by RockStarLab, import trail-guides.csv as posts. Put Related Guides and Visitor Info Page into the ACF fields.
```

In our run, the agent loaded the file with `rsl-ie/upload-from-url` and called `rsl-ie/import-start` with the columns mapped to `acf_related_guides` and `acf_visitor_info_page`. Job 100 created the three guides, each with its related guides and the info page, including the two found by slug.

## FAQ

### Do I need ACF PRO?

No. Relationship and Post Object fields are in the free ACF plugin, and the import works with both.

### Can a Relationship field point to WooCommerce products?

Yes, when the field allows the product post type. Product names, slugs or IDs work the same way.

### What happens with a name that matches nothing?

The field stays empty for that value, and the import doesn’t fail. Check the spelling, or use the slug.

## Related Guides

- [ACF Relationship Fields Break After Import? How to Fix the IDs](https://wpimportexport.com/acf-relationship-fields-break-after-import/)
- [How to Import ACF Fields into WordPress: Repeater, Flexible Content and Images](https://wpimportexport.com/how-to-import-posts-pages-custom-post-types-with-acf-pro-fields/)
- [Import Only Some Posts from a WordPress XML (WXR) Export File](https://wpimportexport.com/import-selected-posts-wordpress-xml-export/)

Get the free plugin on [WordPress.org](https://wordpress.org/plugins/import-export-by-rockstarlab/).
