Support

Account

Home Forums Backend Issues (wp-admin) Import Custom Posts via CSV

Solved

Import Custom Posts via CSV

  • Hi,

    I was wondering what the recommended method is for importing custom post types that contain ACF fields. Ideally I was this to be via a CSV since my client is a lot more comfortable with a spreadsheet rather than XML. The posts also have around 30 fields, so ideally something that is configurable and remembers field mappings so we dont have to re-map every time we import.

    Cheers

  • Hi @alanablett

    I believe you can use a WordPress plugin to import via CSV and save custom columns as custom field data.

    I would take a look on google to see what is available!

    Cheers
    E

  • Hi Elliot,

    Cheers for the advice. I have found http://www.wpallimport.com/ but it seems it doesn’t deal with multi select items, or associating images due to the way ACF stores its values. I dont suppose you know of any resources in particular regarding importing to ACF? I’m not finding a whole lot of options at the moment.

    Thanks for your help

  • Hi @alanablett

    Unfortunately not,

    I’m sure the plugin would offer some actions / filters to allow you to customize the save action for each row. You could use these to handle the multiple value fields.

    ACF expects multiple values to be saved as an array. You can use the update_field function to handle the insert

  • Cheers. Think I may end up coding something for my particular needs. Although with ACF making WordPress a more CMS like experience, an easy to use importer would be extremely useful IMO

  • Hi. Anything new on this?

    I face a similar problem. I have a custom post type, and that custom post type has fields in ACF. I also have ~1 thousand entries in a spreadsheet, with headers that correspond to WP fields (e.g., title, body, categories, tags), as well as ACF fields.

    What is a recommended way to import my CSV? For example, so that one of the columns in the CSV is mapped to a specific ACF field?

  • I actually ended up coding a basic importer that was quite specific to our csv. It does allow for mapping CSV headers against ACF fields, but it isn’t particularly elegant or completely reliable right now. I learned quite a bit whilst doing it and will hopefully be going back to produce something more robust, I think ACF could do with it!

  • Hi @alanablett

    If you could create a simple, customizable and efficient CSV importer for ACF, you would be one popular dev!

    Good luck mate,

    Cheers
    E

  • I know this is marked as solved, but I’d love any information I can get about importing data into the custom post type I created with ACF. I have 500 employees to add to the database and I didn’t budget to do it by hand.

    Any suggestions would be so appreciated!

  • Hi

    Plus +1 here from me. In fact, I’d be happy to contribute(pay) for a plugin, even if it isnt elegant.

    Anyone else find any other solutions?

  • Hi guys

    Just thought I would report back.

    I found a plugin called TurboCSV ($50) which (with the help of the Chris Richardson the developer) I managed to get to work with ACF.

    I had to do quite a lot of testing but I found that if you name the csv column the same name as your ACF custom field, it should map itself automatically when it uploads.

    Other than that, the plugin works a dream and is incredibly reliable.

    Hope this post is useful to others

  • I used WP-Reimporter to import XML and it seemed to work fine. No fiddling about, but obviously not the CSV solution you were after.

  • Elliot this would make for a nice paid add-on for ACF don’t you think?

  • @codynew how did you manage to map checkbox fields? our csv export from a form creates a column for each checkbox value with ‘checked’ as the value. Not very helpful, I know, but we have no control over it.

  • @Elliot Any plans to develop a csv importer tool specifically for ACF, or even publishing a document on ‘how to’ ?

    I’ve noticed that Woo has created an importer for their Woo Commerce product:

    http://www.woothemes.com/products/product-csv-import-suite/

    Nice price too 😉

    I would have no qualms lining your palms with a similar amount 😉

    And WP Types explains the ins and outs here:

    http://wp-types.com/documentation/user-guides/how-to-import-content-into-wordpress-using-csv/

    We have tried, unsuccessfully, using the WP All Import plugin and some of the others seem a bit flaky at best.

  • Hi guys

    Thanks for the request. i will definitely consider creating one after v5 is launched!

    Perhaps in the meantime, you could post up some example xml files to get an idea of how the data would look?

    Thanks
    E

  • Well this is interesting folks, I just looked at the WP All Import site and they have an ACF add on:

    http://www.wpallimport.com/advanced-custom-fields/

    It doesn’t seem to included in their purchase page:

    http://www.wpallimport.com/order-now/

    And it doesn’t seem to be mentioned in their support docs either.

    I guess it’s a start though!

  • Not just XML but CSV too please Elliot.

  • Just came across this post after searching for a solution as well to import CSV into a Custom Post Type with ACF fields in it.

    I found this one:

    http://www.smackcoders.com/wp-ultimate-csv-importer-pro.html

    The free version, downloaded from the plugins section works pretty nice, and seemed to allow me to select ACF based posts, but wont import. They say the paid version (which is a bit pricey per domain) will work with ACF based fields. I’ll let you know when I get the pro version installed.. really hoping it works for that price.

  • We looked at Smackcoders too but at the time it couldn’t import photos.

    Have you tried this one?

    http://www.wpallimport.com/

    They have an ACF add-on.

  • @brianartka I am really keen to know if you can get Smackcoders’ plugin to work with ACF, especially repeaters and photos.

  • Anyone tried the Smackcoder’s or WP All Import plugins? Any recommendations? Also interested in importing radio / checkbox and image fields.

  • @dirtyharry Avoid Smackcoders, it doesn’t support repeater fields and photos.

    WPAI has an add-on for ACF and works well but not without a struggle! That said, they seem to have fixed most of the bugs that were causing us problems.

    It’s fiddly and clunky to use, so tread carefully!

  • Thanks, Bruce! I’ll check out the demo of WPAI and if you don’t mind ask questions here. Thanks a lot!

  • Thanks everyone this thread has been helpful pointing me in the right direction. I’ve imported data fairly easily using WP All Import, but only by creating multiple posts. What I really need to be able to do is populate a repeater field within a single post with multiple records from my CSV. I’m not sure it can be done – I haven’t heard anything back from WP All Import support yet. Has anyone here had any success importing to repeater fields?

Viewing 25 posts - 1 through 25 (of 64 total)

The topic ‘Import Custom Posts via CSV’ is closed to new replies.