On sites where we are using custom post type taxonomies, we often want to have archive page. The problem, is the description field for a taxonomy is a simple textarea field. WE WANT MORE! Here is the code needed to replace the “Description” textarea field with a WYSIWYG field.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
add_action("{$taxonomy}_edit_form_fields", 'add_form_fields_example', 10, 2); function add_form_fields_example($term, $taxonomy){ ?> <tr valign="top"> <th scope="row">Description</th> <td> <?php wp_editor(html_entity_decode($term->description), 'description', array('media_buttons' => false)); ?> <script> jQuery(window).ready(function(){ jQuery('label[for=description]').parent().parent().remove(); }); </script> </td> </tr> <?php } |
This was stolen verbatim from qwerty qwerty over on WordPress StackExchange.