Title: Which function can I call programmatically to import custom CTPs/Fields?
Last modified: April 27, 2017

---

# Which function can I call programmatically to import custom CTPs/Fields?

 *  [William](https://wordpress.org/support/users/william_oneb/)
 * (@william_oneb)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/which-function-can-i-call-programmatically-to-import-custom-ctpsfields/)
 * Hi,
 * Which function can I call programmatically to import the custom CTPs, Fields,
   etc?
 * Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Anonymous User 14808221
 * (@anonymized-14808221)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/which-function-can-i-call-programmatically-to-import-custom-ctpsfields/#post-9073888)
 * There is no such function.
 * You might use a CSV import, as elaborated [here](https://wp-types.com/documentation/user-guides/how-to-import-content-into-wordpress-using-csv/).
 * If this does not fit your need, can you elaborate on the exact goal?
 *  Thread Starter [William](https://wordpress.org/support/users/william_oneb/)
 * (@william_oneb)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/which-function-can-i-call-programmatically-to-import-custom-ctpsfields/#post-9127766)
 * OK then the function that imports “settings.xml” from exported zip file.
    -  This reply was modified 9 years, 1 month ago by [William](https://wordpress.org/support/users/william_oneb/).
 *  Anonymous User 14808221
 * (@anonymized-14808221)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/which-function-can-i-call-programmatically-to-import-custom-ctpsfields/#post-9127793)
 * The function used to import the settings.xml file is (in Types) located in import_from_zip_file.
   php`:
    `get_data_from_file`
 * I hope that helps.
 *  Thread Starter [William](https://wordpress.org/support/users/william_oneb/)
 * (@william_oneb)
 * [9 years ago](https://wordpress.org/support/topic/which-function-can-i-call-programmatically-to-import-custom-ctpsfields/#post-9138523)
 * Unfortunately `get_data_from_file` is a private function so I can’t call it in“
   functions.php” of a theme.
    Any ideas?
 *  Anonymous User 14808221
 * (@anonymized-14808221)
 * [9 years ago](https://wordpress.org/support/topic/which-function-can-i-call-programmatically-to-import-custom-ctpsfields/#post-9143691)
 * We have a public function to import xml files `function wpcf_admin_import_data(
   $data = '', $redirect = true, $context = 'types', $args = array() )`
 * But we may not want to make it public as it will probably also getting outdated
   in the near future.
 * We have to rewrite the whole import process for the next major changes in the
   Many To Many Relationships.
 * Unfortunately, there is not much else I can provide now.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Which function can I call programmatically to import custom CTPs/Fields?’
is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/types_ced1d3.svg)
 * [Toolset Types - Custom Post Types, Custom Fields and Taxonomies](https://wordpress.org/plugins/types/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/types/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/types/)
 * [Active Topics](https://wordpress.org/support/plugin/types/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/types/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/types/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: Anonymous User 14808221
 * Last activity: [9 years ago](https://wordpress.org/support/topic/which-function-can-i-call-programmatically-to-import-custom-ctpsfields/#post-9143691)
 * Status: not resolved