Skip Navigation

Import content from CSV files with post relationships using WP Ultimate CSV Importer Pro in WordPress

Using the WP Ultimate CSV Importer Pro plugin and CSV files you can create or update posts through CSV files and maintain relationships between your post types.

Imported posts will be connected to existing posts.

You can create connections between posts that form one-to-oneone-to-many and many-to-many relationships.

In order to connect posts, you can either use post ids or post titles.

The process of importing posts is almost the same as covered in the How to import data from a CSV file using the WordPress Ultimate CSV Importer plugin tutorial but in addition you need to handle relationships.
  1. In your CSV file add two extra columns:
    1. The relationship slug (column F in the screenshot below)
    2. Id(s) or post title(s) of the post(s) to which the imported post will be connected, separated by commas (column G in the example below)
CSV file with post relationships
CSV file with post relationships

Download the CSV file with post relationships.

You will find the slug of your relationship in Toolset → Relationships.

Where to find the slug relationship
Where to find the slug relationship
  1. Next, in the process of setting up the import in your WordPress site, on the mapping screen use the Toolset Fields section and map the following fields:
Mapping
Mapping

The posts you are importing (participants in our example) will be added to your WordPress and connected to existing courses.

We will add more step-by-step examples soon.

Example 1: one-to-one relationships

Presentations and Speakers.

Speakers and presentations - One-to-one relationship
Speakers and presentations – One-to-one relationship
One-to-one relationships – CSV file
One-to-one relationships – CSV file

Download the CSV file with one-to-one relationships.

We are importing two presentations. The speakers specified in column G already exist in our WordPress. After finishing the import process, two presentation posts will be created in our WordPress site and connected to appropriate speakers.

Importing Presentation posts
Importing Presentation posts
After the import
After the import

Example 2: one-to-many relationships

Managers and Projects.

Managers and projects - one-to-many relationship
Managers and projects – one-to-many relationship
One-to-many relationships – CSV file
One-to-many relationships – CSV file

Download the CSV file with one-to-many relationships.

We are importing two managers. The projects specified in column G already exist in our WordPress. After finishing the import process, two manager posts will be created in our WordPress site and connected to appropriate projects.

Importing Manager posts
Importing Manager posts
After the import
After the import

Example 3: many-to-many relationships

Participants and Courses.

Participants and courses - many-to-many relationship
Participants and courses – many-to-many relationship
many-to-many relationships - CSV file
Many-to-many relationships – CSV file

Download the CSV file with many-to-many relationships.

We are importing three participants. The courses specified in column G already exist in our WordPress. After finishing the import process, three participant posts will be created in our WordPress site and connected to appropriate courses.

Note that in this case, the same course can be assigned to many participants.

Importing Participant posts
Importing Participant posts
After the import
After the import

Example 4: Many-to-many relatinship with the intermediary post type

Singers and Albums

Many-to-many relationship with the intermediary post type
Many-to-many relationship with the intermediary post type
Many-to-many relationships with the intermediary post type – CSV file
Many-to-many relationships with the intermediary post type – CSV file

Download the CSV file with many-to-many relationships with the intermediary post type.

We are importing two posts (concerts). The posts specified in column Lalready exist in our WordPress. The first one represents a singer (e.g. Don Moen) and the second represents an album (e.g. Hiding Place). After finishing the import process, two concert posts (Singers Albums Intermediary Posts) will be created in our WordPress site and connected to appropriate singers and albums.

Mapping
Mapping
After the import
After the import
Updated
January 15, 2021