Post updating to 6.0.1. all taxonomy are wiped from media library ‘attachment’
-
Debug is on, no error being output;
I am trying to retrieve the categories, and then find the specific children categories.
Before Updating WordPress we are able to accomplish this.
After updating WordPress, all categories are removed from the media ‘attachment’
When displaying the contents of get_categories();
I only have uncategorized
Array ( [9] => WP_Term Object ( [term_id] => 1 [name] => Uncategorized [slug] => uncategorized [term_group] => 0 [term_taxonomy_id] => 1 [taxonomy] => category [description] => [parent] => 0 [count] => 4 [filter] => raw [term_order] => 4 [cat_ID] => 1 [category_count] => 4 [category_description] => [cat_name] => Uncategorized [category_nicename] => uncategorized [category_parent] => 0 ) )
This is how we achieve adding taxonomies to attachment post type
// Add Categories taxonomy for media library attachments function add_categories_to_attachments() { register_taxonomy_for_object_type('category', 'attachment'); } add_action('init', 'add_categories_to_attachments');
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Post updating to 6.0.1. all taxonomy are wiped from media library ‘attachment’’ is closed to new replies.