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 😉
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.
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
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
Sorry about the wrong button … John solved the problem …
Thanks for all the three ways to solve the problem, I was aware of the field key, but fiddling the database isn’t my favourite cup of tea, so the xml-export/-import is a more appropriate way and purchasing the pro version might be the best suggestion of all three 😉
Yours,
Thomas
ACF 4.4.7 on WP 4.5.3
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.