p2pConverter
p2pConverter (7 KiB, 676 hits)
Well, this is my very first Wordpress plugin that I have created. Let me tell you why I finally broke down and created one for myself.
You see, I am an administrator for the Secrets of the Universe and on that site are 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!
This plugin has been updated with its own capability, p2pConverter, which is automatically applied to Administrators and Editors on activation. This capability can easily be modified to work with other roles via a Roles and Capabilities plugin. Also, Wordpress updated a hook for manage_page_columns in version 2.5, so Scompt’s extra plugins are not included in this version. If you are using a pre-2.5 version of Wordpress, please download one of the Archived plugins.
A couple more new features I would like to highlight are the fact that the Convert option works nicer when using the search bar to find specific posts. Also, you can now convert the post/page while you are editing it, automatically taking you to the edit screen for the new page/post. (I don’t know how many times I have started a post, only to realize that I meant for it to be a page or vice versa…this is very handy to have now!) Just look for the convert option in the bottom right side bar on the edit post/page screen.
Oh, and the newest version also includes a nice AJAX interface in the Manage section.
== p2pConverter==
Author: bbbco
Plugin URI: http://www.briandgoad.com/blog/p2pConverter
Tags: manage, edit, pages, admin, plugin, convert, posts
Requires at least: 2.5
Tested up to: 2.6
Stable tag: 0.7
Author URI: http://www.briandgoad.com/blog
== Description ==
Converts either a static Page into a Post, or a Post into a static Page!
Just click on the Manage tab in the Admin interface, and click the Posts or Pages sub-tab.
Within that page you will see an extra column, with a Convert! option. If you want to convert
a page or a post to the either, click that link! Or you can click Convert while editing a post or page in the bottom right side bar. A p2pConverter role capability prevents unwanted users from converting pages (i.e. only Administrators and Editors have this ability), which can be adjusted by using a Role Manager plugin.
== Installation ==
Copy the `p2pConverter` directory to your plugins directory and activate the p2pConverter
plugin from WordPress, and volia! You will now be able to convert!
== Frequently Asked Questions ==
None yet!
[Ask a question] mailto: bdgoad (at) gmail (dot) com
== Future Plans ==
* Incorporate bulk managemnet system per request
== Version History ==
= Version 0.7 =
* AJAX-ified things.
* Script.aculo.us-ed the Manage section.
* OOP-ed the code
= Version 0.6 =
* Can convert post/page while in Edit Mode (located in bottom right side bar)
* Works nicer when using the search bar to find specific posts/pages
* Easier to mass manage
* Now includes own Role Capability, which automatically defaults to Administrators and Editors (can be adjusted using Role Manager plugin).
= Version 0.5 =
* As per request, Convert! option only available to roles with the ability to Delete Posts and/or Pages
* Included comments in my plugin
* Tab structured code
= Version 0.4 =
* Integrated title of Post/Page into prompt
= Version 0.3 =
* Integrated with default css
* Included prompt to ensure user accuracy
= Version 0.2 =
* Initial work on plugin
* Including scompt’s ManageCustomPages
= Version 0.1 =
* Idea / Concept formulation
= Download Now! =
*Version 0.6
p2pConverter (7 KiB, 676 hits)
February 21st, 2008 at 8:37 pm
Insalled your plug in - it works with the post, but have not options on the page convert. Any suggestions.
Thanks
February 24th, 2008 at 3:37 pm
This plugin uses scompt’s Manage Custom Pages script, which is included in the zip folder. Please ensure that the managepages.php and json.php files are included in the folder along with p2pconverter.php.
If this is the cases, there might be an issue with another plugin interfering with scompt’s ManageCustomPages plugin.
Brian
March 1st, 2008 at 9:19 am
Thanks Brian
This plugin was just the ticket. One of my sites was recently compromised and as part of the attack, all the pages were changed to posts, so this was a great way of changing them all back…
March 3rd, 2008 at 10:56 am
Cris B:
I am glad it helped you! Thanks for the feedback!
Brian
April 14th, 2008 at 12:23 pm
Hello,
I’ve installed this plugin last week and it’s really useful, thank you so much!
Adam
April 20th, 2008 at 9:30 am
thanks.. thats very cool plugin.
Thank you very much
April 26th, 2008 at 8:55 am
Thank you very much!
This plugin saved my life on a corrupted wordpress 2.1 installation at visible-orbit.org. I upgraded to 2.5.1 and then made use of your plugin to turn all the posts (that had mysteriously been converted from pages) back to pages again.
July 9th, 2008 at 5:25 am
[...] Version: 0.4 - License: GPL - Author: bbbco - Plugin Page - » Download [...]
July 12th, 2008 at 5:30 am
Awesome plugin!! Should have been a default feature within WP from the start to be honest.
Is it possible to add support for the Role Manager (v2.2.2) plugin so that you can allow only certain roles to be able to convert posts to pages and the other way round?
July 12th, 2008 at 1:43 pm
Steven,
Thanks for your comment. There are currently no plans to add support to integrate with Role Manager unless there is enough request and support for it. If you would like to modify the plugin to integrate like you would like with your website, you may do so as per the GPL license.
Thanks again for your feedback, and let me know if you do choose to modify the plugin!
July 17th, 2008 at 9:44 pm
p2pConverter…
This plugin allows you to easily convert a post to a page and vice versa through an easy to use interface. Just click on your Manage tab in Administration, and you will see a Convert option under….
July 28th, 2008 at 2:23 am
This is a cool plugin
July 29th, 2008 at 8:39 am
VERY COOL PLUGIN!!! This plugin works like a charm with 2.5, which saved me hours of time.
One recommendation: Have a batch conversion. You could add in the Page or Post Manage tab an option to convert all posts/pages that are selected. However, even without this feature it’s still relatively easy (unless of course you have hundreds of conversions, but it’s still easier than doing it by hand). THANK YOU. ~Paul
July 29th, 2008 at 4:30 pm
[...] p2pConverter [...]
July 29th, 2008 at 4:37 pm
[...] p2pConverter 0.6 [...]
July 29th, 2008 at 5:23 pm
[...] p2pConverter [...]
July 29th, 2008 at 5:24 pm
[...] p2pConverter [...]
July 29th, 2008 at 11:02 pm
[...] cool new WP plug-ins Found some cool new WP plug-ins - check ‘em out: Post and Page Exerpts Page to Post/Post to Page Converter Show or hide content from bots Internal Link building __________________ Making Coin - great [...]
July 30th, 2008 at 12:36 am
[...] p2pConverter [...]
July 30th, 2008 at 5:10 am
[...] Plugin Page [...]
July 30th, 2008 at 6:13 am
Bbbco,
Much thanks, great plugin! Been wondering if someone was going to be motivated enough to produce a version that worked! Summum Bonum
July 31st, 2008 at 10:26 am
[...] p2pConverter [...]
August 4th, 2008 at 1:58 am
[...] p2pConverter [...]
August 7th, 2008 at 1:08 pm
[...] p2pConverter 0.7 [...]
August 10th, 2008 at 4:06 pm
Hi! I have a question: When you convert a page to a post, are there any rewrite rules created as part of the process?
I have a page that has been linked to numerous times. I’d like to change it to a post, but I don’t want to mess up all of those links & bookmarks.
TIA! –Lisa
August 10th, 2008 at 5:06 pm
Lisa,
This plugin does not contain any rewrite rules other than the $wp_rewrite->flush_rules() function. However, after running some tests, it seems that Wordpress checks automatically to see if the reference is correct, and if not to redirect it to the correct closest matching URL. Example: If I had a page at http://www.briandgoad.com/blog/test and I converted it, the new URL would become http://www.briandgoad.com/2008/08/test. If I tried to access this page at the previous address, Wordpress would automatically forward me to the new URL. This works vice versa, regardless of whether you have converted a post/page or not.
Hope this helps!
Brian
August 10th, 2008 at 5:25 pm
Thanks for the info - I never even thought to check that!
It doesn’t seem to work, though, if you’re not using permalinks. My page address is http://www.lisaclarke.net/?page_id=43 but it comes up empty if I try to find http://www.lisaclarke.net/?p=43
I also tried to find a post that lives at http://www.lisaclarke.net/?p=667 by typing in http://www.lisaclarke.net/?page_id=667 and that also fails.
I might be able to rig up something in the .htaccess file. Thanks for the quick reply.
August 13th, 2008 at 11:03 am
[...] er forresten alle innlegg med oversatte innstikk blitt konvertert til sider. Innstikket p2pConverter kan brukes til den type konvertering om du ikke vil grave deg ned i databasen manuelt. « [...]
August 29th, 2008 at 10:37 am
[...] Page2Post (or Post2Page) Converter. It’s a simple plugin that converts your posts to pages or vice-versa. I know that I had a lot of pages that had built up over the years, and the original hierarchy had got lost. Not wanting to delete them, they were piling up in my ‘pages’ menu, simple answer: convert them to posts, they’re then archived! Alternatively, if you have a post that is a classic or a foundational type post: why not make it a page? You no longer have to copy and paste it. One click! Voila! [...]
September 16th, 2008 at 2:19 am
thanks, works great!
September 18th, 2008 at 5:17 am
Hi, I need a plugin like this!
I’ve given it a go, but as per my attempts to modify the database manually, I don’t get the ‘converted’ page to display correctly - only an image within the post is converted; the text is lost. And the url goes back to a id# rather than a friendly one.
It might be a permalinks issue? I’ve got the all-in-one-seo plugin (and the permalink redirect plugin) - I they that might affect it, but deactivating it doesn’t help??
Thanks,
September 18th, 2008 at 9:30 am
Mic,
You should not have to modify the database manually. You should only have to install this plugin, and it will take care of the database changes for you.
What version of WP are you using? I see that your permalinks are structured by category, but doing some tests on my Sandbox WP, that does not affect the plugin.
I do not exactly understand what you mean by saying that only an image is converted… After conversion, the page/post permalinks should remain in tact. Can you send me an email with more info?
October 10th, 2008 at 1:27 am
Thanks for the Great Plugin!
Cheers.
October 10th, 2008 at 1:38 am
[...] I was searching for some way to convert a Wordpress post (a blog entry) to a page (static content) without the need to edit individual database entries: ‘post_status’ column - from ‘publish’ to ’static’ etc when I came across p2pConverter [...]
October 26th, 2008 at 6:55 am
I’m a newbie to WordPress and created posts instead of pages - your plugin saved me hours of copying and pasting - thx very much
November 10th, 2008 at 11:11 am
Thanks!!! You just saved me a lot of time!