1

Please could someone give me an idiots guide to adding more than one TinyMCE editor to a page editor page please. I am creating my own wordpress theme and the multiple editors are an essential part of the website.

I would like to know what code I need to add and where I add it for the editors to appear in the Editor side and the code needed to output the code to the live website.

I have searched online for the answer but can not understand the ones that I have found. I have only just started learning PHP.

Any help will be gratefully appreciated!

Andi

1

2 Answers 2

1

You'll need to use add_meta_box() to setup the field and wp_editor() to make a new instance of TinyMCE.

2
  • 1
    Isn't there a problem with use tinyMCE editors in metaboxes? I believe its to do with the fact that the editors shouldn't be place in something that is moveable? (But I can't find the link currently...) Commented Sep 27, 2012 at 10:25
  • 1
    You're right. From wp_editor(): "Once instantiated, the WYSIWYG editor cannot be moved around in the DOM. What this means in practical terms, is that you cannot put it in meta-boxes that can be dragged and placed elsewhere on the page." I'm not sure whether you can make metaboxes unmoveable.
    – mrwweb
    Commented Sep 27, 2012 at 14:31
0

I've got a class on Gist that will create a full secondary TinyMCE post editor which will look and function exactly like the original editor complete with toolbar, support for shortcodes, etc.. Just drop it into your theme and assign the post_type which should display the editor. You can then call the content saved to the secondary editor with the function get_the_subcontent() similarly as you would for the_content()

https://gist.github.com/dcondrey/ae987ec166fde5e35be3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.