Hi @math1991,
How do I import the data from an xml file into this database table? I have tried creating an add on plugin for this as suggested on your site but I’m not sure what the correct function is.
An add-on would work, or custom code that uses our API to do it (see pmxi_saved_post): http://www.wpallimport.com/documentation/developers/action-reference/.
Usually I suggest storing the fields in add-on fields, or custom fields, then using get_post_meta() to grab the data and the WPDB class to insert it into the custom table: https://developer.ww.wp.xz.cn/reference/classes/wpdb/. There’s an example snippet here that you can modify as needed: https://www.wpallimport.com/documentation/developers/code-snippets/#import-data-to-custom-database-table-during-record-import.
Thats great thanks very much for your help!
Can you please explain how this one works?
We use the custom function to send data to a CPT? then it move everything to a custom database and deletes the CPT?
What exactly is placed for “$value = get_post_meta($id, ‘_your_temp_field’, true);”
“_your_temp_field” ? just a field or entire CPT?