I am working on a BuddyPress plug-in for a client that requires users to be able to add content from the front end - they never see the back end for security reasons. I have the plug-in written and it works perfectly but it is missing one thing: a rich text editor so that users can customize their content (within reason, of course). Until now, I have ignored this request from the client and explained it as not being possible without a lot more work.

Today, however, I upgraded to 3.3 and noticed the new wp_editor tag. I tried some of the examples shown here, but I cannot get any of them to work properly (a bare-bones call produces the editor but the tabs and media buttons don't work, a basic TinyMCE setting array yields nothing [just a plain textarea].) Inspection with Chrome's Developer Tools reveals that some JavaScript files are being included in the admin area that are not included on the front end. What is the best way to include these files and make this thing work? Thanks!

4 Answers 4


note that wp_editor will echo to output, not put it in a variable. If you want to put it in a variable, just do

wp_editor($content, 'textarea_rich', $args);
$html = ob_get_contents();

and you have what you need in $html. You can also see https://plugins.svn.wordpress.org/indypress/tags/1.0/indypress/form_inputs/tinymce.php for a working implementation.

Another issue I noted is some problem is with w3-total cache minifying (actually, I had those issue with wp_tiny_mce, the function used in wp <= 3.2; I have not checked if it is buggy in wp_editor, too)


The following code should work for you. Just make sure that the textarea id is all lower-case and alphanumeric.

$post = get_post( $post_id, 'OBJECT' );
$args = array(
    'wpautop' => true,
    'media_buttons' => true,
    'editor_class' => 'frontend',
    'textarea_rows' => 5,
    'tabindex' => 1
wp_editor( esc_html( $post->post_content ), 'textareaid2', $args );

You can read the documentation of the wp_editor function in this Codex page.

  • Thanks, Jamàl, but that is exactly the code that I tried to use. Dec 21, 2011 at 13:20

add this to your theme's footer just before the closing body tag:

<?php wp_footer(); ?>

all the editor scripts for wp_editor are output in the footer, and if your theme does not have this tag, which calls do_action('wp_footer'); then the editor won't work.

  • Thanks Deryk, but out of habit I always make sure that is in the footer of every theme I create. Jan 9, 2012 at 16:54
  • oh, that is't too bad. I was struggling with this one for a while, until I noticed the theme i was using did not have a wp_footer() function. once I added that. all the scripts were added to the footer and it worked great.
    – dwenaus
    Jan 12, 2012 at 7:11

Don't know if you're still working on this but you can try "WP User Frontend" plugin. It does exactly what you want.

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.