Overview
If you already have a CSV or spreadsheet file, comprising of either two or more Keywords, or a single Keyword with sub keywords (known as Column Names in Page Generator Pro), the Plugin provides an Import CSV function, which will mass import keywords and terms from a single CSV file, without needing to manually add them individually through the Keywords form.
To access your Keywords, click on the Page Generator Pro menu entry in the WordPress Administration interface, and then click on Keywords.
To import multiple Keywords to Page Generator Pro, click the Import CSV or Spreadsheet button below the Page Generator Pro: Keywords title, which can be found towards the top of the screen:
The Import form will then be displayed, where you can define the following options:
File
Choose the CSV file or spreadsheet on your computer to upload.
Import Method
Depending on your file structure and how you want to store the data, the following options are available:
Import Columns into a single Keyword
This option is recommended if:
- The data in your CSV file / spreadsheet is relational – for example, you’d want to only output a ZIP Code that belongs to a City or County, and
- Column Names are stored in the CSV file / spreadsheet’s first row (e.g. A1, B1, C1 in the below example).
Import Columns as multiple Keywords
This option is recommended if:
- The data in your CSV file / spreadsheet is not relational – for example, your CSV file / spreadsheet contains a list of services offered and locations, and those services are available in all locations, and
- Keyword Names are stored in the CSV file / spreadsheet’s first row.
Import Rows into a single Keyword
This option is recommended if:
- The data in your CSV file / spreadsheet is relational – for example, you’d want to only output a ZIP Code that belongs to a City or County, and
- Column Names are stored in the CSV file / spreadsheet’s first column (e.g. A1, A2, C2 in the below example).
Import Rows as multiple Keywords
This option is recommended if:
- The data in your CSV file / spreadsheet is not relational – for example, your CSV file contains a list of services offered and locations, and those services are available in all locations, and
- Keyword Names are stored in the CSV file / spreadsheet’s first column.
Keyword Name
When importing data as a single Keyword, an option is displayed to specify the Keyword name to store the data in.
This must be a unique Keyword name that does not exist in the Keywords section of the Plugin.
Import
When you’re finished, click the Import button.
A notification will be displayed confirming the number of Keywords that were imported successfully.
Common Issues
The Columns field can only contain letters, numbers, hyphens and underscores
The CSV file’s columns (i.e. first row) must only contain letters, numbers, hyphens and underscores.
Data is mapped to the wrong columns
Ensure that:
- Data containing the delimiter (e.g. a comma) must be in quotation marks. See Docs: https://www.wpzinc.com/documentation/page-generator-pro/keywords/#using-the-delimiter-character-within-terms
- Data containing quotation marks within a column must be correctly escaped with a backslash, and not represented as
"
. See Docs: https://www.wpzinc.com/documentation/page-generator-pro/keywords/#using-quotation-marks-within-delineated-terms - In some cases, a column containing no data may require the blank
character to be set. See Docs: https://www.wpzinc.com/documentation/page-generator-pro/keywords/#support-for-blank-entries
We recommend:
- Splitting your CSV file into smaller files, using a service such as splitcsv.com,
- Adding the CSV files using the Add Keyword’s CSV File Source