Skip Navigation

[Resolved] Blank custom fields after import with CSV file

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 1 reply, has 2 voices.

Last updated by Nigel 10 months, 2 weeks ago.

Author
Posts
#2690854

Dear Toolset Support Team,

I am experiencing an issue with displaying data in custom fields within a custom post type named "Concerts" that I created using Toolset on my local WordPress development environment powered by Local on a MacBook.

To populate the custom fields, I used the WP Import Export Lite plugin (https://wordpress.org/plugins/wp-import-export-lite/) to import data from a CSV file. The import process completes successfully, and the data is correctly mapped to the respective custom fields as verified in the wp_postmeta table. However, the custom fields appear blank when I view the individual concert posts in the WordPress admin dashboard.

Here's a brief overview of the steps I followed and the issue:

Created a custom post type "Concerts" and associated custom fields using Toolset.
Imported data from a CSV file, mapping columns to the corresponding field slugs in Toolset.
Verified that data is correctly entered into the wp_postmeta table.
Observed that the custom fields are not displaying the imported data in the WordPress backend.

Screenshots for reference:
WP Import Export Lite setup - field mapping: hidden link
Missing field on a Concert listing: hidden link
Database Post Meta Entries: hidden link

I have ensured all mappings and configurations are correct and am seeking your expertise to resolve why the imported data is not being displayed in the Toolset custom fields in the admin interface.

Thank you for your time and assistance.

Thank you,
GW

#2690903

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi there

I suspect the issue is fairly straightforward.

Custom fields created with Types have a postmeta key that is prefixed with "wpcf-".

So if you were to create a field with a slug "priority", then in wp_postmeta the corresponding meta key would be "wpcf-priority".

Your import data source needs to use this prefix, or the import process needs to add the prefix.

Then you can expect the fields to show up when editing the posts.

You may find this description of the different field types helpful: https://toolset.com/documentation/customizing-sites-using-php/functions/

#2690953

BINGO! Adding the prefix did the job. Thank you for the support. I will read the document.