pTypeConverter (154.0 KiB, 8,439 hits)
pTypeConverter is a complete reworking of my previous plugin p2pConverter, which was a very hand dandy plugin for very many users of WordPress. However, with the new WordPress changes in 2.9 and ultimately 3.0, things regarding posts and pages have changed, specifically when it comes to custom posts. That is why I decided to rewrite this plugin, in order to provide users with the ability easily convert their existing posts and pages to a custom post.
Currently, it just has very basic abilities, and is kind of cranky as it displays every single type of post you might have available on one page. Soon, I plan on integrating filtering and pagination to make it easier for users to interface.
If you are unfamiliar with my previous plugin, p2pConverter, and why I created it, let me refresh your memory, if you are interested that is. If not, just skip on down to the rest of the important info.
A number of years ago while WordPress was still young, and I was trying to finish my sophomore year of college, I was also an administrator for the mostly defunct site Secrets of the Universe, a site for a friend to display his comics and the stories in his head for all to see. On that site were quite a few static pages. However (probably during an update or server recovery or something of the such) all of the static pages ended up as regular posts, and the permalinks broke. When this was finally discovered, I sought a solution to convert the posts back to pages easily. Well, after searching for such a plugin (I could only find one such called Post2Page yet it was broken, and I could not find any way to contact the author) I stumbled across a few websites that gave me some clues as to get this type of plugin to work. Anyways, that’s the story…I eventually learned how to put it together into a plugin, and here it is for your enjoyment!
Installation: Download the zip file to your computer. Extract the folder and files to your computer. Copy the `pTypeConverter` directory to your plugins directory and activate the pTypeConverter plugin from WordPress.
To access pTypeConverter, look under the Tools menu for the pTypeConverter submenu. Here you will find an admin page that displays all of your posts.
This plugin has been updated with its own capability, pTypeConverter, which is automatically applied to Administrators and Editors roles on activation. This capability can easily be modified to work with other roles via a Roles and Capabilities plugin.
And one last thing: Be careful with how you use this plugin, for as of now, you can convert any type of post into any other type, including the new “menu” elements, attachments, and revisions. All use of pTypeConverter, of any version, is at the user’s risk. Brian D. Goad accepts no responsibility for the results of any actions taken by the use of pTypeConverter. It is a tool, and its misuse could damage your website severely. Be careful, and think before you convert!
Frequently Asked Questions
When I convert a page to a post, does it show up under the Posts section, or does it still remain in the Pages section?
The Page becomes a Post, and will show up in the Posts section along with your other posts.
When I convert a post to a page, does all of the extra meta-data get converted as well?
In a short answer, Yes.
In a long answer, Yes, because posts and pages, etc are all considered the same thing in
Wordpress (i.e., they all are just records within a table). The main
difference between them is that they have a field that determines what
type of element they are. So any element that had post qualities, when
turned into a page will have the same content, but now have the page
qualities and ignore whatever fields apply to the post type. If the
same page that was a post is converted back to a post, you will find
that the same post qualities will still exist, even though they were
not evident while it was a page.
Does this mean that if I convert a post with a bunch of comments that the comments will still be available on the page?
Yes, all comments will be kept in tact.
I converted a page to a post, but the comments section is not displaying on the full post. What happened? What can I do to fix this?
WordPress automatically defaults comments on pages to be turned off. When you convert the page to a post, the configurations remain the same, so the comments setting is turned off, even though it is now a post. Future versions of this plugin will probably incorporate controls to determine if you want comments enabled or disabled.
To enable comments on the new post, please follow these steps:
– Click to Posts > Posts
– Scroll to the post that you want to enable comments on
– Click the “Edit” link for that post
– On the Edit Post section, in the upper right-hand section, click the yellow “Screen Options” button. A large dropdown section should appear
– Click the checkbox for “Discussion”
– Now look underneath your main body text editor (the large text area where you type in all of your article information). You should see checkbox options in regards to comments.
– Click the checkbox to “Allow comments”
– Click the Save button
– Now visit your page, and comments should be enabled.
Why are my comments not showing up after converting to a X?
Please check to make sure you have enabled Discussion Comments on the converted post as detailed above. If this still does not resolve your issue, please check to ensure your theme allows comments to be displayed for the post type by including <?php comments_template(”, true); ?> on the post type template.
When looking to find a post to convert, I see a bunch of extra listings called Revisions. Should I convert them as well?
No. All you need to convert is the post or page element itself, and not the
revision. I plan on adding some features to the plugin to make it
easier to use and filter out those elements like media and revisions
that should be hidden in the future.
I have some posts that I would like to convert to pages, but since posts have categories and pages don’t, wouldn’t the permalinks break and any pages I have indexed in the search engines be broken?
No. WordPress is smart about the way they create their pretty URLs. The pages and posts permalinks are retained when converting. As well as categories and such.
What about the URL? My users will be lost if the bookmarked the old one after I convert!
No worries! The plugin rewrites the permalinks after conversion so that your old URL will automagically forward the user to the new URL. WordPress takes care of most of the magic behind the scenes. If you are really concerned about URLs because of SEO, you can use a plugin lik Platinum SEO to configure things more to your liking.
Will converting posts to pages affect my Menu structure?
No, this should not affect your menu structure, unless you have it setup someway to automatically add new Pages to your menu.
pTypeConverter (154.0 KiB, 8,439 hits)
Don’t forget to donate if this plugin has helped you!
Author URI: http://www.briandgoad.com/blog
Plugin URI: http://www.briandgoad.com/blog/pTypeConverter Tags: post, posts, page, pages, admin, plugin, convert, change, pTC, p2pConverter, custom post, custom posts, post type, post types, pTypeConverter
Requires at least: 2.9
Tested up to: 3.3.1
Stable tag: 0.2.5
== Description ==
Converts post types from one to another. This plugin is a complete reworking of my old plugin p2pConverter. pTypeConverter allows you to easily convert any post type of a certain post to another in an easy to use interface. A pTypeConverter role capability prevents unwanted users from converting pages (i.e. only Administrators and Editors have this ability to begin with), which can be adjusted by using a Role Manager plugin.
== Installation ==
Copy the `pTypeConverter` directory to your plugins directory and activate the pTypeConverter
plugin from WordPress. To access pTypeConverter, look under the Tools menu for the pTypeConverter
== Future Plans ==
* Implement proper Admin display of posts screen
== Version History ==
* Added Welcome screen with instructions and FAQ
* Enhanced user interface functionality with convert messages
= Version 0.2.1 =
* Fixed blocking issue with install
= Version 0.2 =
* jQuerified and Ajaxified the plugin
* Added filtering, logging, and other options
= Version 0.1.5 =
* Fixed activation issue (thanks Erlend from jMonkeyEngine!)
= Version 0.1 =
* Rewrote from my old plugin p2pConverter
* Created its own submenu page
* Allow bulk conversion
pTypeConverter (154.0 KiB, 8,439 hits)