回答:
0
でparent
引数を渡してみてくださいget_terms()
。
parent (整数)この用語の直接の子を取得します(明示的な親である用語のみがこの値です)。0が渡されると、トップレベルの用語のみが返されます。デフォルトは空の文字列です。
http://codex.wordpress.org/Function_Reference/get_termsを参照してください。
階層を使用する= 0
$my_taxonomy = get_terms('my_taxonomy', 'orderby=count&hide_empty=0&hierarchical=0');
hierarchical=0
動作しません。より良い方法はparent=0