I found that it was easy enough to get a basic field for Categories added to the attachments page by using register_taxonomy_for_object_type
and add_post_type_support
:
1 2 3 4 5 | add_action('admin_init', 'reg_tax'); function reg_tax() { register_taxonomy_for_object_type('category', 'attachment'); add_post_type_support('attachment', 'category'); } |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.