📅  最后修改于: 2022-03-11 14:56:36.338000             🧑  作者: Mango
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,
]);