The Page.ly MultiEdit Plugin
We have been using WordPress a long time, and we always felt like it needed just a little more oomph to the editor. This plugin is a update of an older plugin we wrote.
0.9.7 has been tested with 3.0
The MultiEdit plugin creates tinyMCE editable regions or “blocks” inside a page template. This is great for creating a template specific content block outside of the normal the_content() output. Perfect for creating two column single page layouts etc. Note: Only Works with Visual Editor
Instructions
1. Install the MultiEdit plugin to your blog/website
2. Activate the Plugin
3. Create a custom page template and declare MultiEdit regions as a comma separated list under Template Name. May be able to just add the MultiEdit line to page.php as well.. not tested. NOTE: Do not add spaces the list or region names.
Good: MultiEdit: Right,Bottom,Left
Bad: MultiEdit: Left,Right Column,Bottom (space between region name)
Bad: MultiEdit: Left, Right, Bottom (space after comma)
4. Then within your template, determine where this content will show by calling the function. multieditDisplay(‘Region’)
5. Create or Edit a Page and select the custom template. in this case CustomPage
6. Refresh the page, and you will see Tabs above the TinyMCE editor that correlate with the name of your defined regions.
7. Click a tab, add content, save the page. When you view the page now you will see your MultiEdit content renders on the page. style with CSS as needed.
All done.
Note: The data is saved in custom_fields associated with this post/page. If you deactivate the plugin, the content is not lost as it is saved as a meta item. The plugin creates the custom fields for you based on what you declare in the template file.
Why use this plugin?
Ever need to add content to a page out side of the normal the_content() area. Previously you either added it directly to the page template, or you created a widget region specifically for it. Both methods are impractical. Your client cannot edit hardcoded content (easily) and why create tons of widget areas if you are only going to use them on 1 or 2 pages. This plugin allows you to create content blocks per template. So if you define 2 MultieEdit regions, every page that uses this template will get 2 additional editable regions that you can use on every page using this template, and the content is unique to that page.
This may be helpful
Plugin is released under GPL. Feel free to tweak it or incorporate it into your theme framework as needed. Please retain our copyright notice (in the plugin file) and give credit where credit is due if you modify/incorporate it.
Who Wrote this Plugin?
Joshua Strebel the founder of Page.ly did. Okay, But what’s page.ly? : Complete WordPress Hosting with a sexy 2 minute setup.
Enjoy.
Updated WordPress 3.0
A user was kind enough to let us know about how the plugin works in 3.0
if (in_array(basename($_SERVER['PHP_SELF']),array(‘page.php’)) && $_GET['action'] == ‘edit’ ) {
add_action(‘init’,'multiedit’);
}For some reason, the wp-admin url when editing a page does not include page.php anymore but instead post.php, maybe due to the fact that a page is now a custom post type.
By changing the above to:
if (in_array(basename($_SERVER['PHP_SELF']),array(‘post.php’)) && $_GET['action'] == ‘edit’ ) {
add_action(‘init’,'multiedit’);
}the tabs are now showing up!













“Please retain our copyright notice and give credit where credit is due.”
Actually I hate this stuff. Did WordPress ever said you something like this? People are making money out of WordPress and they are imposing things like this. These limitations are crap.
Really? So the plugin is free to use and hack as you need, and asking for a simple retention of our credit is too much? Sometimes you can’t please anyone.
[...] UPDATE: New plugin here for WP2.9 [...]
This is going to be so sweet! I am one who is pleased.
Will it be added to the Page.ly admin area at some point by any chance? Or is it a plugin that is only integrable in themes?
I assume only the latter as of now. I will be adding it to my themes from now on for sure though.
The plugin rely’s on the MultiEdit: region being defined on a theme custom template.. so it really is theme dependent and can be used with any theme. May not add it to page.ly installs only because it’s usage is slightly advanced.
[...] Page.ly MultiEdit [...]
As I read it, the makers are asking for a credit in themes and in plug-ins,rather than on the sites where it is used. Can’t see an objection to that. Sounds like something very useful for us.
The copyright notice is in the plugin file itself. Nothing shows publicly.
I’d be *proud* to give you credit for this handy work. I typically provide links to all the plugins I use.
This is desperately needed at the core level for WP.
Thanks for your hard work,
~k~
We’ve just started using this in one of our latest client builds, it’s phenomally easy to use!
The way it integrates so naturally with the WordPress WYSIWYG should make it really easy for Clients to use – thanks fellas!
Awesome work. I can definitely see this coming in handy for client work.
@Saad Bassi
Maybe you should take a moment to read the
license.txtfile that’s distributed with every copy of WordPress before saying things like that.[...] Blog � Better Websites, Fast. Page.ly � MultiEdit Plugin (PlugIn,Editor,WordPress) [...]
?
This may be me being a little to needy:
Is there anyway so that it just shows the tabs associated with the defined areas and not the “main content” tab?
If I have two columns, I only want to see “Left” and “Right” as tab choices.
Thanks,
~k~
Hey Kyle..
So Just created 1 multiedit region and call it Right..
So you would see “Main Content” and “Right”.. the_content() would act as your left col.
Maybe someday I make it so you can rename “Main Content” tab
Thanks, Joshua.
That’s what I’ve been doing tonight. I’ll keep an eye out for future builds for this.
Thanks again.
~k~
[...] try out a new plugin that would help with editable content, I installed the MultiEdit plugin with instructions here. MultEdit lets you flip between tabs to edit multiple areas of content! So exciting, but no matter [...]
[...] como editamos las entradas, es decir con el editor WYSIWYG TinyMCE?Aquí es donde entra a jugar el Plugin MultiEdit, el cual creara regiones editables dentro de nuestra pagina, para poder trabajar con TinyMCE como [...]
I haven’t tried implementing this just yet. But, it opens up a whole new world for WordPress as a CMS. Thank you for this awesome plugin.
Hi
Nice plugin, but I’m having trouble getting it to actually save content that I enter in the new tabs. I have a new custom template, the tabs show, but when I add new content it reverts back to the main content tab and won’t save. Thoughts?
Using WPMU 2.9.1.1
Thx
not tested on wpmu..
but i have gotten this report before.. Will look at this afternoon.
To say that this plugin is amazing, it’s reductive :)
I will try it asap but want share a thought…
If I use a defined structure to organize content layout it means that I think to put, in regions, more or less always the same kind of content.
So, what about to allow a further step: define also which kind of content could be contained by a block.
May be defined text, may be widgets, may be a function that retrieve content from db and shows result…
Joining this to a form plugin that create/populate db tables, become a killer application: custom insert and custom output, all easy to manage. You can create infinite applications only with this.
A great work ;)
[...] Page.ly MultiEdit [...]
I am using this plugin for a clients site. It’s a pretty good plugin. As someone stated before, a nice feature would be to control the stab structure. Other than that, the plugin is very cool. Thanks for this!
I’ve seen cases where the main content disappears if the “HTML” view is selected for one of the multi edit areas. (using WPMU) Have you seen this? Thanks.
1 do you have the latest version?
.. so the actual content for the main region disappears when you click html on a sub region. I’ll look into that.
This is a fantastic little plugin!
Thanks for working on this.
One possible extention:
Right now to edit a page I can insert code — <?php edit_post_link('Edit this element.', '’, ”); ?>
I would love to be able to do this for the MultiEdit and for a click to direct the user to the correct TinyMCE tab (right now obviously they all just bring up the main content tab).
It would probably require a new function call and therefore be pretty complex, but if you have the time, it would sure be neat!
Do you think you might add an option to return the output of
multieditDisplay($index, $display = true)rather than always echoing it? I can easily add that to my copy of the plugin, but it would be a nice feature to have baked in.Thanks for this contribution!
Hi Josh, were you able to reproduce the problem? Thanks.
As of 3-10-2010, with WordPress 2.9.2 and version .9.4 of the plugin, I get a few odd things printing out below the article “Edit” pages.
One is a rouge “print_r” debug around line 87 in multiedit.php (print_r($matches);).
The other is that array_slice blows up on line 112 of multiedit.php if the page being edited does not have a custom template. I fixed it by adding an if statement around it like so:
if (file_exists($templatefile)) { // my if statement
$template_data = implode(”, array_slice(file($templatefile), 0, 10));
}
Everything else seems to work good – thanks!
Thanks @thaddeusmt I’ll clean that up tomorrow and do another point release.
This plugin is a godsend for CMS’s. I’m implementing it into a theme tonight and notice that when I rename a region, WP keeps looking for the old one and gives me an error message. Is there somewhere in phpmyadmin where I can remove the reference to it?
I’m with the other poster, being able to rename “main content” would be a great addition.
What’s the reason for not being able to use the html editor for the editable regions? Is it because it is stored as metadata? Is there a way around this? I ask because I’m trying to implement a few jquery plugins in these sections (e.g. accordian, sortable tables). If I can help write this…I’d love to. I just don’t want to read all of your code and figure out how it works if I don’t have to… :)
Ok….I really should have tried this before just taking what you say in a note at the top of this page for granted…
“Note: Only Works with Visual Editor”
This is, in point of fact, not true. I was able to add html markup in the html mode, and then switch back to the regular mode and see all of the content with the changes updated.
The only thing odd is that it wraps the entire section in a tag anyway.
Other than that…works great. This is an incredible plugin. Thanks again for great work.
“Puis au sein de votre modèle,” ca veut dire quoi?
4. Puis au sein de votre modèle, de déterminer où ce contenu sera montrent en appelant la fonction. multieditDisplay ( «région»)
[...] Page.ly MultiEdit [...]
[...] WordPress Hosting » MultiEdit PluginPlugin I really gotta check out, looks nice for sites where you need a couple different editable areas per Post/Page, but not custom content types. [...]
A BIG thanks also from me to the multi-edit plugin – until now it has saved me about a half an hour of work each day !! I can’t wait to show it to my clients, in that context I have 2 questions:
1) Could it be possible to use [shortcodes] within the tabs?!
2) I always get a text snippet like the following displayed in the bottom of my post-edit screen, can I remove it somehow?
Array ( [0] => multiedit_Pic1 [1] => Pic1 ) Array ( [0] => multiedit_Pic2 [1] => Pic2 ) Array ( [0] => multiedit_Pic3 [1] => Pic3 ) Array ( [0] => multiedit_Pic4 [1] => Pic4 ) Array ( [0] => multiedit_Pic5 [1] => Pic5 ) Array ( [0] => multiedit_Pic6 [1] => Pic6 ) Array ( [0] => multiedit_Pic7 [1] => Pic7 ) Array ( [0] => multiedit_Pic8 [1] => Pic8 ) Array ( [0] => multiedit_Pic9 [1] => Pic9 )
Thanks again!
Thomas Feder
@Thomas Feder make sure you have the latest version. should not be seeing that print_r()
[...] MultiEdit – The MultiEdit plugin creates tinyMCE editable regions or “blocks” inside a page template. This is great for creating a template specific content block outside of the normal the_content() output. Perfect for creating two column single page layouts etc [...]
Great Plugin! I think the tabbed interface works well.
It is a little buggy though when saving directly from html view. If you switch back to visual after making changes and then save, it works fine. Using WPMU 2.9.2.
Thanks for a great contribution.
Hi Joshua,
Unfortunately I still get that print. (also with the newest plugin)
I’ll check for any conflicts and get back here if I find anything..
Thanks :)
On the WordPress side, this plugin works exactly the way you think it ought to. I feel like I’ve been looking for something like this ever since I started using WP.
My one complaint is that I’m ending up with lots of junk in my code like mce_href=”whatever” and mce_bogus=”1″ and so on. I don’t know if that’s something you can fix or if it’s a problem with tinyMCE, but it’s super annoying.
hmm will investigate the extra code.
I agree with Jordan, Great plugin, however there does seem to be a bug – when you save a page in the HTML view of one of the regions this content gets duplicated in the Main Content area, thus erasing what you have put in the main content area. It does work if you save the page in visual mode, but its impracticable to ask people to always switch back to Visual mode before saving. Would be great to have a fix, really appreciate your plugin.
On my list ;)
This is a pretty cool plugin but I can’t seem to get it to work properly on my custom theme. I’ve added everything properly and it’s showing up fine. However, when I go to the WP backend and put content in the different tabs it always seems to put the content in the “Main” tab instead of my created tab. Any help would be much appreciated.
Very interesting plugin, I’ve been using Magic Fields since being introduced to it — I’m interested to see the flexibility this plugin has, but Magic Fields opens up a world of opportunities — worth checking out http://www.magicfields.org
Thanks for innovating — I’m looking forward to trying this out.
I’m with Jordan up above… GREAT plugin, but the bug that happens while saving while in HTML isn’t so great. Any ideas when this might be fixed? I’m using this plugin on a few sites for other people, and am pretty nervous that they are going to end up deleting their content because of the bug. Maybe there would be a way to disable the “update” button while html tab is active?
Gotcha,
We are in a big datacenter move right now. Early next week I can look at it.
When applied to the Default Template, I’m getting an error on line 112 since the file name is empty.
I’m new to PHP and WordPress but am giving it my best shot.
There also doesn’t seem to be a way in WordPress to set your Default Template. It’s automatically set to page.php. Is that correct?
If that is the only instance where the template name would be empty, is it safe to use an if-else statement?
0.9.5 fixes the bug that overwrites the content if saved in HTML mode.
nothing shows up when i update the page, no content is there just blank?
I’m still having the bug Joshua :( If I edit in html within one of the new tabs I created and then save, it still overwrites the main content tab.
@Rhianon be sure to clear your browser cache
the bug fix was made to the javascript file and you could have the old one cached.
wow… how embarrassing. Thanks for all your help with this, this is the most helpful plugin I use.
Hi Joshua, first of all: GREAT PLUGIN! I really would like to use this one on my sites. But there’s one big problem: I don’t know where to put multieditDisplay(‘Region’) in my template :( I am using the WooThemes templates. Maybe you can help me with this?
Sorry for this but I am no web developer :/
Cheers
Sascha
@sascha Hey there, it’s fairly simple once you understand how wordpress themes work. Unfortunately the details are more than can be covered here. Suggested reading
Thanx Joshua :) I hope I will figure it out..
Just trying to get this plugin to work for WordPress 3.0 beta and it doesn’t seem to be. It is an essential plugin to what I’m doing so I was just wondering if there’s a quick fix or if I have to wait a little while for a compatible version to be released?
Luke
no idea.. have not tested with 3.0
I am completely new to blogging. I uploaded the program and would love to use it, but I really don’t have an idea how to go about that. First, where do I find the custom page template? I clicked on your wp link, but I still don’t understand.
Thanks, Sally