Skip Navigation

[Resolved] Can I convert or import WordPress native posts to a Toolset Custom Post Type?

This support ticket is created 7 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 7 years, 3 months ago.

Assisted by: Christian Cox.

Author
Posts
#563966

I have about 50 WordPress posts that I've imported from a previous site and I'd like to make them into a Types custom Post Type so that I have a bit more control of how they are being viewed on my site. Is there a way to convert them all at once? I'm not seeing anything in the Types documentation and the last Community Forum Post I saw regarding this was from 2012.

hidden link

Thanks in advance for your help!

Cheers,
Laura

#564026

Hi, there's not an easy way to move posts between post types from the wp-admin area. The two solutions I know of include manual database manipulation, or WordPress import / export with some manual XML file changes.

General idea for manual DB manipulation:
Create your new Custom Post Type using Types, then modify the database wp_posts table to update the post_type value for each of the posts you want to migrate. Set the new post_type value to match the new post type's slug. That's pretty much it for basic post migration. I can help you do this in phpMyAdmin, or by running a custom SQL query in your database if you need assistance.

General idea for import / export XML file manipulation:
If modifying the database isn't an option, you can export your posts using the WordPress export tool. Then edit the generated XML file using a text editor like Notepad or Sublime Text, and modify the wp:post_type node for each post to use the new post type slug. Import the updated file, then delete all the old posts from the old post type. Example update:

<wp:post_type><![CDATA[new-post-type-slug]]></wp:post_type>

If you have custom fields in these posts that need to be transferred over, that process is a bit more involved. We can discuss that in more detail if you want, but I'll need to know more about your setup and the custom fields in use.