Support

Account

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

Solved

Import Custom Posts via CSV

  • WP All Import support team are awesome. We’ve submitted 2 issues and they replied within 24 hours.

    The first one was solved in 24 hours, the issue was to add support for validated_field type (http://wordpress.org/plugins/validated-field-for-acf/).

    The second one, is about date_picker in repeater field. Though it took a bit longer but they work and fixed it in less than 10 days, just before Dec 25.

    Now for the plugin itself, we found version 4 much better. With above issues solved WPAI v4.0.7 is now working with ACF v4.3.9 + ACF:Repeater Field v1.1.1 + ACF:Validated Field v1.3.1 + WPAI:ACF Add-on 3.0.2.

  • There are lot changes and improvements had been made in the mean time. https://www.smackcoders.com/wp-ultimate-csv-importer-pro.html is not for single domain, you can avail up to 4 free add on domains. Also it can handle advance inline media/images/photos import as csv. Kindly check the live demo for more details.

  • I’d recommend TurboCSV for importing data to any post type which has ACF fields. It allows you to create templates for field mapping so you can has several different post types and allow a client to upload new data.

    I find this particularly useful for clients that have physical branch locations which require updating in bulk, and also have a product catalogue to update.

    http://wphostreviews.com/product/turbocsv

  • I found a new plugin which works great with “Advanced custom fields” and is much cheaper than all other plugins out there! Intuitive, easy to use.

    http://codecanyon.net/item/wordpress-awesome-import-export-plugin/12896266

  • Hello, I found a new Plugin called “WordPress Awesome import export” which works with Advanced Custom Fields and is much cheaper than all other plugins! Very easy to use! http://codecanyon.net/item/wordpress-awesome-import-export-plugin/12896266

    • Aminta

    • August 7, 2016 at 3:33 am

    Hi!

    With the plugin Really Simple Csv Import, that is free and open source (https://github.com/hissy/rs-csv-importer), you can import Csv fields like “name a, name b, name c” as repeater fields or <select> elements. The author made specific hooks (filters) for this goal and they are well documented here.

    For example, taking advantage of the “really_simple_csv_importer_save_meta filter” I managed to import, from a Csv, a field written like “author a, author b, author c” as a ACF repeater in WP, with the following code of mine:

    add_filter('really_simple_csv_importer_save_meta', function($meta, $post, $is_update) {
         if (strpos($value, ',') !== false) { // if there is a "," in the string...
    	            $_value = preg_split("/,+/", $value); // "author a, author b, author c" pattern is converted in an array
    	            $rows = count($_value); // return the number of the elements in array
    	            $meta[$key] = $rows; // in ACF scheme, this is the meta_key for the number of rows, ie: "meta_key : authors, meta_value: 2"
                
                	// the loop creates each single row, in the form required by ACF: "meta_key: authors_0_author, meta_value: Mario Rossi" 
    	            for ($i=0; $i<$rows; $i++) {
    		            $plural = 'authors';
    		            $addition_sign = '_';
    		            $singular = 'author';
    		            
    		            $meta[$plural.$addition_sign.$i.$addition_sign.$singular] = $_value[$i]; // ie:  $meta['authors_0_author'] = $_value[0];
    	            } // end "for"
    
    } // end if
    
    else { // when the repeater has only one value...
    	        	 $i = 0;
    	        	
    	        	 $plural = 'authors';
    		         $addition_sign = '_';
    		         $singular = 'author';
    
    	        	 $meta[$key] = 1;
    	        	 $meta[$plural.$addition_sign.$i.$addition_sign.$singular] = $value;
            	} // end else
    
    });
  • Hi there,

    very interesting, but also quite frustrating to read along, as far as like me aou are looking for a solution for a simple problem, which is filtering the CSV-file during the import.

    A have a file containing about two to three thousend lines from which I need to import and update two or three hundred on a weekly or even daily basis into ACF fields. The lines can be easyly indentified by the content of a field, eg content==”exactlythis”.

    AFAIK: None of the plugins mentioned above offers such a feature. But maybe I’m completely wrong, I hope so, but don’t think I am.

    And yes, of course there are ways to filter these files before starting to import, but that would be an unconvenience to my customer. And he’s the king.

    Yours
    Thomas

  • I generally use WP All Import http://www.wpallimport.com/. The premium version includes and ACF add on and it has an update feature that only updates changed records.

  • Hi John,

    I got that feature, but it won’t help me, because from time to time there will be some new records to be added … so the manual filtering will nonetheless be required in these cases and as we all know our kings, the customers, well enough, that we can be sure that in one of three or four times the need for manual filtering will be slipped the customer’s mind.

    As an update:

    Smackcoders’ WP Ultimate CSV Importer doesn’t have any filters … they suggest to “kindly provide with a CSV with the requires number of records” … I love these kind of answers …

    Chris Richardson from TurboCSV is sorry and tells me, that it seems like it’d be useful, so he’ll look into it.

    I think I’ll have to code something to do the filtering and producing an decent file with an unique name, which will be imported.

    Yours,
    Thomas

  • Thomas, like I said, I use WP All Import all the time. The “Update existing posts” option has a setting near the end of the import setup to create new post for new records. So the update becomes and update or insert. WP all import also has hooks at all of the important places in the process so that you can even filter what it’s doing http://www.wpallimport.com/documentation/advanced/action-reference/.

    I agree that it’s still impossible to rule out user error though, simple things like “XYZ” not being equal to “xyz” just go right over the head of most of my clients.

  • I’m not sure if I got your idea …

    The way to so some action before importing have to be the pmxi_before_xml_import hook and there by fidgeting with PHP-Code to filter the file, whose name and hereabout are to be extracted from some other templates or whatever WP All Import calls the setting of an import routine. I’m sorry, not my cup of tea.

    But well, there is Filtering With XPath: In Step 2 of WP All Import, you can specify filtering options to only import records in your file that match your criteria. Perhaps this could be the solution. And why the heck didn’t I recognise this eature before?

    To be on the save side I just wrote a minor script to filter an uploaded CSV-file on the server and save it with an unique file name.

  • To make a long story short: WP All Import does the trick. If you’re looking for a plugin, which is useful to import, update and even delete (custom) posts by a – if necessary or reasonable – filtered list of records, you’ll need the pro version, but you get a lot of bang for the bucks. Useful for synchronizing information with an erp-system or a related database. Thanks to John for insisting, even though his suggestion was too sophisticated for my skills 😉

  • Like ACF, there is a one time cost. I love one time purchases. Yes it’s a bit more than ACF, but for a developer that is constantly giving clients some type of import process, like Thomas says, I think it’s well worth the cost. Glad you got it worked out.

  • Just wanted to mentioned that mag07’s technique on page two of this thread works.

    Setup fields in ACF
    Create one record and populate each ACF field
    Export posts/CPT using a plugin, I used WP Ultimate CSV Importer
    Then open your CSV and copy+paste your fields from your source CSV to the appropriate column in the exported file.
    Import new file using WP Ultimate CSV Importer
    ACF fields will appear under “Custom Fields” and will not be restricted.

    This approach is basically a more labor-intensive, but *free* alternative to simply paying for a premium plugin that will do it in one-swoop.

Viewing 14 posts - 51 through 64 (of 64 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.