WP All Import/Export
How to use ACPT with WP All Import/Export
Last updated
How to use ACPT with WP All Import/Export
Last updated
ACPT has a specific integration with WP All Import and Export, our favorite way to .
In this short tutorial, we'll learn how to export and then import ACPT meta fields from/to a custom post type.
This topic was covered multiple times, so please refer to other tutorials.
Suppose to create a CPT called "Movie" with just three simple meta fields:
text
list
Ok, let's move to step 2.
Go to WP All Export and select the Movie custom post type.
Now, select the XML custom format:
In the post loop, drag the standard fields you need (ID, title, etc...) and then create a custom XML node, the name of the node doesn't matter, and use this special PHP function:
This function takes just the post ID as an argument, and it exports the settings and the values of every Movie meta field associated with a given ID:
Go ahead and export the XML and you are good to go for Step 3.
Go to WP All Import and select the obtained XML from the Export. Select import Movies:
Go straight to Step 3 and drag your data.
Note the ACPT Add-on box, which contains a text field. Drag here the ACPT meta:
Go on with the import and voila, every meta field is present in exported posts!
If you need to export/import taxonomy and user meta fields, the whole process is identical, except for the name of the php function to use:
Again, these functions take just one argument. Use these functions in your custom XML and import it everywhere you need.