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
版权声明:本文标题:functions - Make Categories a Dropdown Menu in Media Library 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749092586a2314751.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论