Зрегистрировал, CPT и custom-taxonomy, как мне вывести названия которые я добавил в таксономию.
Пробую так
$terms = get_terms([
'taxonomy' => "taxbeton",
'hide_empty' => false,
]);
print_r($terms);
получаю массив:
Array ( [0] => WP_Term Object ( [term_id] => 3 [name] => Бетон гидротехнический [slug] =>%d0%b1%d0%b5%d1%82%d0%be%d0%bd-%d0%b3%d0%b8%d0%b4%d1%80%d0%be%d1%82%d0%b5%d1%85%d0%bd%d0%b8%d1%87%d0%b5%d1%81%d0%ba%d0%b8%d0%b9 [term_group] => 0 [term_taxonomy_id] => 3 [taxonomy] => taxbeton [description] => [parent] => 0 [count] => 0 [filter] => raw ) [1] => WP_Term Object ( [term_id] => 2 [name] => Бетон товарный [slug] => %d0%b1%d0%b5%d1%82%d0%be%d0%bd-%d1%82%d0%be%d0%b2%d0%b0%d1%80%d0%bd%d1%8b%d0%b9 [term_group] => 0 [term_taxonomy_id] => 2 [taxonomy] => taxbeton [description] => [parent] => 0 [count] => 0 [filter] => raw ) [2] => WP_Term Object ( [term_id] => 4 [name] => Керамзитобетон [slug] => %d0%ba%d0%b5%d1%80%d0%b0%d0%bc%d0%b7%d0%b8%d1%82%d0%be%d0%b1%d0%b5%d1%82%d0%be%d0%bd [term_group] => 0 [term_taxonomy_id] => 4 [taxonomy] => taxbeton [description] => [parent] => 0 [count] => 0 [filter] => raw ))
как мне достать name тут ?