I have two problems with your CSV import plugin …
First I can not find any documentation on how the ‘image_array’ field works (‘image’ just contains a URL, and that works fine). But if i want to add several images I just can’t get it to work (same applies for ‘doc_array’).
And second, the plugin is not PHP7 compatible, as it uses eg ‘mysql_error()’ functions, not the WP wrappers … ‘mysql_…()’ functions are deprecated since PHP 5.5
Thanks for your help, Mirko
One other thing: Is there a way to create a new user (based on the given email in the csv) and asign the directory entry accordingly, so that every user can manage his entry himself??¿¿
Just use any of the free CSV import plugins available at WordPress.org – they work better anyway 🙂
OK, but how does the DirectoryTheme save the associated images or documents?¿
CSV plugin will not copy or insert any images for you, it can just update related custom fields. If you provide direct link to ‘image’ custom field than it will show that image
As for the ‘image_array’ field, it requires serialized array with image links and some metadata about the image. Now the problem is that plugin doesn’t support inserting values as arrays into custom field. It can only import key => value pair so that value is in form of string. Even if you provide array it will be converted to a string
To make it import array of images you will need to edit CSV import plugin and add condition which will check whether value which is being imported is array. If it is, it should be passed as array to update_post_meta() function
There has to be a better way to do this. I done this a lot and never had an issue. Why doesn’t ‘image’ and ‘images’ in the header work anymore?
Start your new website today!