Support » Plugins » Hacks » use wp_editor on category description

  • Resolved Rommel Castro

    (@rommelxcastro)


    hi, i need to modify the description textarea with the wp_description() i been looking on internet but i can’t find a solution
    i was thinking maybe remove the default textarea and just a create a new one, but again idk how to remove it

    thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Rommel Castro

    (@rommelxcastro)

    Moderator bcworkz

    (@bcworkz)

    You can add a new field by hooking the action ‘category_form_fields’ and outputting whatever HTML you want. Then hook the action ‘edited_category’ to do something with the submitted content. The description is stored in the description column of term_taxonomy in the row for the category term ID. The term itself is found by term_ID in the terms table. I don’t know of any functions to store descriptions, only to get it. Thus you would need to use $wpdb->update() to change the value.

    To remove the existing textarea, enqueue a javascript function to do so on page load, or simply hide it with CSS. Doing it cleanly via PHP would be very cumbersome.

    For that matter, you could replace the textarea with whatever using javascript alone, the only PHP is to enqueue the script.

    Thread Starter Rommel Castro

    (@rommelxcastro)

    i understand! i appreciate your help @bcworkz

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘use wp_editor on category description’ is closed to new replies.