How to Switch Post Type in WordPress

Prem Tiwari - - WordPress, WordPress Snippets

This is a very short tutorial which will let to know how to switch post type in WordPress sites.

In this tutorial, I will share a simple code snippet which allows you to switch post type and also I have shared a WordPress plugin named Post Type Switcher.

How to Switch Post Type in WordPress

Use the below code at the end of the functions.php file and save. It will allow you to switch the post type from page to post and post to a page.

If you don’t want to use this code, then use Post Type Switcher WordPress plugin by John James Jacoby. This plugin will add a simple post-type drop-down on the post editor screen to switch the post type.

By using the Post Type Switcher plugin you can convert nearly every combination of posts, pages, and even custom post types:

  1. Page to Post
  2. Post to Page
  3. Post to Custom
  4. Custom to Custom

How to install Post Type Switcher plugin

The installation of this very simple as other plugins. If you have just started with WordPress, then check out:

After the installation, click on Activate button to enable the plugin features on your WordPress site. See the below screenshots how it will look like after activated:


How to Switch Post Type in WordPress-2

Hope this code will help you. Please do you like & share this article with your friends, and don’t forget to follow us on Facebook and Twitter to learn cool WordPress tutorials.

About: Prem Tiwari

Prem Tiwari is the founder of and also a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies.

Tags: , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.