$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>How to import CSV into Custom Post Type custom fields?|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

How to import CSV into Custom Post Type custom fields?

matteradmin10PV0评论

I have created a Custom Post Type and then used a plugin to create the custom fields for that post type.

It will display a type of membership: Name Address Zip Website

But I am stuck on how to take the csv file I have, which has 700 entries and import it to create 700 entries under the CPT I created and autopopulate the custom fields I created.

I tried a lot of plugins, but none seemed to do both parts. Some let me just select the CTP but I couldn´t get all the fields populated.

Just needed to know best way to accomplish this.

I have created a Custom Post Type and then used a plugin to create the custom fields for that post type.

It will display a type of membership: Name Address Zip Website

But I am stuck on how to take the csv file I have, which has 700 entries and import it to create 700 entries under the CPT I created and autopopulate the custom fields I created.

I tried a lot of plugins, but none seemed to do both parts. Some let me just select the CTP but I couldn´t get all the fields populated.

Just needed to know best way to accomplish this.

Share Improve this question asked Feb 7, 2014 at 17:12 NolanNolan 1031 gold badge1 silver badge5 bronze badges 2
  • Did you try wordpress/plugins/wp-ultimate-csv-importer ? It took some work but that one worked for me. – Michelle Commented Feb 7, 2014 at 17:27
  • 3 Also - what plugin did you use to create the custom fields? I've noticed some custom-field-creating plugins prefix the custom field names and it's not obvious when that happens. Makes it hard to match the fields with their contents. – Michelle Commented Feb 7, 2014 at 17:30
Add a comment  | 

3 Answers 3

Reset to default -2

I'm using a plugin called TurboCSV (found here, at the time of writing). The plugin offers support to add data to your various custom fields, which need to be created before the import takes place. In my personal use, I was able to successfully import thousands of items from one .csv, including hundreds of taxonomy terms and custom fields.

Have a look at the plugin's documentation to see how involved it is and how much you're able to do.

I used a plugin called Really Simple CSV Importer https://wordpress/plugins/really-simple-csv-importer/

If that link is dead, you can find it on github here: https://github/dansullyLT/rs-csv-importer

It populated my custom fields that I made in ACF.

Here is how I used it.

Download the sample CSV file the plugin dev offers you. You make each header row the field name and import through the WordPress > Tools > Import menu.

You have to include a column of post_id and post_name, but you can leave them blank. Make the post_type column the name of your custom field group and set the post_status. You may get some errors on import, but just read them carefully and you'll be able to correct them.

It worked great for all of my ACF except images. My images were a little complicated though.

Good Luck!

http://www.wpallimport/

There's a free version of this plugin that should do all the necessary work to import Custom Post Types from a CSV or Excel file.

The paid versions also allow you to import users and to better modify advanced custom fields associated with CPT's as well.

Post a comment

comment list (0)

  1. No comments so far