WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using bbPress 2x and modified the plugin to use the new wp_editor in place of the textarea for adding new topics and replies. This part works beautifully.

Where I am stuck is when a person clicks edit for a topic or a reply. The post content is not showing up in the editor.

I'm probably just missing something really stupid, and hoping someone can chime in on how to fix this last piece.

Here is what I am using:

$tabindex = bbp_get_tab_index();
$settings = array(
    'wpautop' => true,
    'media_buttons' => true,
    'editor_class' => 'tumble',
    'tabindex' => $tabindex

wp_editor( '', 'bbp_topic_content', $settings );



Just got an answer to my question, and it works great

Thanks go out to: http://soderlind.no/archives/2011/09/25/front-end-editor-in-wordpress-3-3/#comment-207831

$post = get_post($post_id, 'OBJECT');
wp_editor(esc_html($post->post_content), 'textarea01', $settings);

share|improve this question
You may want to remove the esc_html function, otherwise the visual editor will dislay the actual html code. – Stephen Harris Jan 2 '12 at 0:33
You might consider adding your answer and marking your question as answered, so it doesn't sit in the dark hall of unanswered questions for eternity. As a bonus, you give yourself 15 points :) – Matthew Boynes Jan 30 '12 at 4:37
up vote 1 down vote accepted

For the sake of completeness, I am going to post an answer based on the solution you edited in your question.

$post = get_post( $post_id, 'OBJECT' );
wp_editor( esc_html( $post->post_content ), 'textarea01', $settings );

This would escape the HTML too so if you are editing a post you might want to replace the last line with:

wp_editor( $post->post_content, 'textarea01', $settings );
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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