I have a post on my frontpage and I want to add the TinyMCE editor to it and could not make it work.

I've tried these guides without any luck

The guides are for making it work on backend.

I guess I need to find out how to do these things...

  1. Add some Javascript with wp_enqueue_script.
  2. Add some inline Javascript settings within script-tags.
  3. Add a textarea or a div with a specific name, class or ID.

Help me in any way, code, links to guides, advice, anything.

1 Answer 1


What you're looking for is two things:

  1. The wp_tiny_mce function that loads all the needed JS etc
  2. The code below:

This to setup the JS etc:

// Setup the TinyMCE stuff and target it at our desired textarea
wp_tiny_mce( true, array( "editor_selector" => 'tinymce_class' ) );

And this HTML where you need the editor box:

<div class="editor_container">
    <textarea class="large-text tinymce_class" rows="5" id="tinymce_1" name="name">
        <?php echo esc_html($value) ?>
  • I've tried something like that but it gives me: "Fatal error: Call to undefined function wp_tiny_mce()" when calling it in the functions.php. Maybe the code have changed in WP 3.2? Commented Sep 29, 2011 at 15:14
  • @Jens - Why are you be calling it in your functions file.. what are you hooking to, if anything? Everything you need is right there, so show us how you're implementing it(please).
    – t31os
    Commented Dec 8, 2011 at 12:53

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.