admin管理员组

文章数量:1130349

I would like the categories menu to appear as a drop-down in both the list mode and grid mode view of the Wordpress media library. As of now, it only appears as a drop-down in list mode.

List Mode - Correct (categories appear as drop-down):

Grid Mode - Incorrect (categories appear as text field):

Here is the code I'm using in functions.php, which does work. I'm just not sure how to force the drop-down appearance in both view modes:

function add_categories_to_attachments() {
    register_taxonomy_for_object_type( 'category', 'attachment' );
}
add_action( 'init' , 'add_categories_to_attachments' );

I would like the categories menu to appear as a drop-down in both the list mode and grid mode view of the Wordpress media library. As of now, it only appears as a drop-down in list mode.

List Mode - Correct (categories appear as drop-down):

Grid Mode - Incorrect (categories appear as text field):

Here is the code I'm using in functions.php, which does work. I'm just not sure how to force the drop-down appearance in both view modes:

function add_categories_to_attachments() {
    register_taxonomy_for_object_type( 'category', 'attachment' );
}
add_action( 'init' , 'add_categories_to_attachments' );

本文标签: functionsMake Categories a Dropdown Menu in Media Library