我在Wordpress项目上使用自定义分类法,并且需要通过代码创建新类别。
甚至有可能吗?我无法为我的问题找到一些解决方案。
使用wp_insert_term
wp_insert_term( 'category', 'your_custom_taxonomy' );