I added new field ‘picture’ (input type file) to category with help of these
add_action('category_edit_form_fields','category_edit_form_fields');
add_action('category_edit_form', 'category_edit_form');
add_action('category_add_form_fields','category_edit_form_fields');
add_action('category_add_form','category_edit_form');
function category_edit_form() {
?>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('#edittag').attr( "enctype", "multipart/form-data" ).attr( "encoding", "multipart/form-data" );
});
</script>
<?php
}
function category_edit_form_fields () {
?>
<tr class="form-field">
<th valign="top" scope="row">
<label for="catpic"><?php _e('Picture of the category', ''); ?></label>
</th>
<td>
<input type="file" id="catpic" name="catpic"/>
</td>
</tr>
<?php
}
You are free to use any taxonomy, just replace category
to your taxonomy name