K
K
Konstantin Teploukhov2018-05-24 05:11:06
WordPress
Konstantin Teploukhov, 2018-05-24 05:11:06

Print the taxioma shortcut in a loop. Without html wrapper?

Registered new taxoma "type_product" For its post type .
You need to somehow display the label in the loop

Tyk
5b061e7dcb255020860921.jpeg

Tried like this
the_taxonomies( get_the_ID(), 'type_tovar', '', ' ', '' );

But it displays the title and not the label + link.
Tyk
5b061ee263049374484969.jpeg

I don't need a link (just a label, no html wrapper). It's already dawning and I'm still suffering, wp kama rummaged through - I didn't find anything. Help out bros ;(

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alvvi, 2018-05-24
@blood-moon

<?php 
$terms = get_terms( array(
    'taxonomy' => 'type_tovar'
) );

foreach ( $terms as $term ) {
  echo $term->slug;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question