I am stuck on an issue here. I have this one theme which has the post type called 'listing' and I have this new theme with the post type 'iwp_property' When I use the Wordpress Exporter/Importer tool and goto import the data, I get this error 'Invalid post type listing' My question is what would be the most efficient way to export and import with mapping...I am completely open to suggestions...

  • This sounds like a job for WP All Import (not cheap) if you don't want to write code. or something like WP Utility Script Runner (free) if you're willing to write code yourself to handle the import. – mrben522 Feb 11 '19 at 20:21
  • I don't think you can take a post of one type from one theme, and expect it to map cleanly to another post type on another theme without doing some manual data changing – Tom J Nowell Feb 11 '19 at 21:50

Assuming that all the meta (fields) in both of the Custom Post Types (CTPs) is relatable, this is the way I would go about figuring out how much work is in order:

  1. Make a new post in each CTP (both sites) and make sure all the meta fields are filled in. It will help if you make all the fields that you want to match have the same value (like Listing-Field-1) so they are easier to match up later.
  2. Export the CPT from both sites. In the resulting XML files, find the post you just added.
  3. Compare the XML elements to see how different the structure is.

If you are lucky, both CPTs will use the same structure. In that case you can find/replace the meta field names of the data you want to move to match up with where they need to go in the new system (sometimes some crafty selection tools in VS Code or Sublime Text can help).

If you are unlucky (like I usually am) you will have to write code to output the XML in a way that is structured to match the new system.

Or, you could use a plugin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.