Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

How To Switch/Convert Custom Post Types in WordPress

Last updated on by
Elegant Themes
How To Switch/Convert Custom Post Types in WordPress

WordPress comes with five default post types, which are posts, pages, attachments, revisions and menus. Users can also create their own custom post types. This gives them power to create different types of content and display them differently on their websites. Recently we found a need to merge two custom post type into one for a client’s project. In this article, we will show you how to switch custom post types without writing any code. Suppose if you created a post and wanted to covert it into a page, or a vice-versa, then you would be able to do this by following this tutorial. If you want to switch from one custom post type to another, then you would be able to do that as well. Lastly, you will be convert multiple post types at once which will allow you to save a lot of time.

First thing you need to do is install and activate the Post Type Switcher plugin. Post Type Switcher adds an option to switch post type of a specific post by going to the post edit screen or manage posts area. On the edit screen of your post or another post type, you will see a drop down under the “Publish” meta box. Choose the post type you want to switch to and click the update button.

Changing post type in post edit area

You can also quickly change an individual post’s type from the Quick Edit screen while viewing all posts:

Changing post type in quick edit

Post Type Switcher also allows you to switch post type for multiple posts by editing them in the bulk action mode. Follow these steps:

  1. Go to All Posts
  2. Select the posts you want to change
  3. In the Bulk Actions drop-down menu, located towards the top left side of the screen, select Edit and press the Apply button.
  4. Now you will see all selected posts in quick edit mode. Review the posts you have selected and then change the post type as needed.

Changing post type for multiple posts with bulk edit

Converting Multiple Post Types Advanced Mode

Post Type Switcher is a quicker and a simpler solution. However, there might be situations where you would need to select post types in a particular category, tag, or post types with a particular post format. In such situations you can use Convert Post Types plugin. Install and activate this plugin. Upon activation, a new “Convert post types” menu item will appear under Tools. You will notice that it is a powerful plugin, which allows you to do so many things and select posts by filtering them into categories, parent pages, tags, etc.

Changing Post Types of Posts matching particular criteria

If you ever wanted to switch a post to a page in WordPress, convert a page into a post, or merge two custom post types into one, then we hope that you found this article helpful. If you have any questions, then please leave them in the comments. If you have used other methods to convert post types in WordPress, then share it with us in the comments below.


Editorial Staff at WPBeginner is a team of WordPress lovers led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »

Comments

  1. Megan Pangan says:

    OMG you saved me LIFE! LOVE you forever for this plugin and tutorial!!!

  2. Severine C says:

    Hi,

    thanks for this tutorial.

    I had to do it on a site using the WPML plugin, and it just didn’t work…

    If you use WMPL, you have to do an extra manipulation : go to the WP database, and in the wp_icl_translations table, change the element_type field for the post to convert ; for example, if you switch from a page to a custom post type named “Recipe”, change “post_page” to “post_recipe”.

    And to do it for a set of posts, here is the sql command :

    UPDATE `wp_icl_translations` SET `element_type`=replace(`element_type`,’post_page’,'post_recipe’) WHERE element_id IN (….)
    ;

  3. Phil says:

    This. Is. Amazing. Thank you.

  4. Joseph Herb says:

    Thank you WP beginner editorial staff for this post. I am very frustrated for my clients’ this type requirement. First when he told about this type of customization I think how it possible? Then went to search for this issue and found your blog. I take deep breath. Post Type Switcher & Convert post types both plugins are very wonderful. You make me easy to solve this.

    Regards.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.