• Resolved Shunarjuna

    (@shunarjuna)


    I have a business directory theme (Vantage by Appthemes) and would like to convert the textarea where businesses fill out their details into a wp visual & HTML editor.
    I have managed to put the editor in above the text area with this snippet;
    <?php wp_editor( EditYourContentHere, listingeditor ); ?>
    But like that people filling out the form will have to copy and paste the HTML into the text area, which is not ideal and a little clunky in my opinion.
    This is the code for the text area;
    <textarea name="post_content"><?php echo esc_textarea( $listing->post_content ); ?></textarea>
    Any suggestions on how to replace the text area with the editor and still have it send the information to the right place when the form is submitted?
    Or at least, could somebody explain what each thing in the text area code means and maybe I could figure it out myself (I am a real beginner so be kind :))

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Shunarjuna

    (@shunarjuna)

    Never mind, I have it sorted.
    In case anyone else wants to do the same sort of thing here is my solution;
    I simply replaced
    <textarea name="post_content"><?php echo esc_textarea( $listing->post_content ); ?></textarea>
    with
    <?php wp_editor( $listing->post_content, 'listingeditor', $settings = array('textarea_name' => post_content) ); ?>

    Thread Starter Shunarjuna

    (@shunarjuna)

    Just closing the thread.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Convert text area into wp editor’ is closed to new replies.