我正在使用wp_insert_term
要添加如下自定义分类法:
wp_insert_term(
$_POST[\'city\'], // the term
\'property-city\', // the taxonomy
array(
\'description\'=> $_POST[\'city\'],
\'slug\' => $_POST[\'city\']
)
);
它确实起到了作用,但它并没有将这个术语与某个post ID联系起来。因此,我的问题是:wp\\u insert\\u term具体做了什么?它只是插入术语吗?如果是,我如何将此术语链接到特定的帖子ID?