Yesterday, I wanted to write a useful post on my site. Basically, all my posts are for you all who find my posts are useful. I started to write my post very late(3am) and I was sleepy. I finished my post and ready to publish. But I wrote the content in the page instead of the post. I normally write my post a bit long to explain and give the samples to you so you can follow along my post without any issues.
Well, I can change the post type by updating the database if I want. But if there are some plugins that do the job why I will spend time to code by myself. So I find a Post Type Switcher plugin that does the job very well.
With the plugin, you can convert:
- Page to Post
- Post to Page
- Post to Custom
- Custom to Custom
Note that, the invisible post types such as revisions, menus and so on are excluded from this plugin. If you really need to convert those invisible post types, you will use the ‘pts_post_type_filter’ filter. I don’t cover this filter in this post.
Once you install and activate the plugin, navigate to the page or post or custom post type item you want to convert. Then uses the quick edit and change to post type you want. See the screenshot below.
After converting the post type, check the converted post type. If the converted post type look good to you, you are done. But if not, you may use the backup to restore the previous data back. Then you will do the convert the post type by updating the database instead. For me, I convert from page to post with the plugin and it works as I expect. No issues occur. And that’s it for today.