📜  wordpress 按分类获取术语 - 无论代码示例

📅  最后修改于: 2022-03-11 14:56:36.338000             🧑  作者: Mango

代码示例2
You need to pass an additional argument to get_terms(). The default is to hide
"empty" terms-- terms which are assigned to no posts.

$terms = get_terms([
    'taxonomy' => $taxonomy,
    'hide_empty' => false,
]);