Answer the question
In order to leave comments, you need to log in
How to display terms from custom taxonomy in Wordpress?
What to change in the code so that the displayed tag names (tags) belong to a specific post. Now the entire content of the taxonomy is glued to each post announcement.
<?php $terms = get_terms( ['taxonomy' => 'first' , 'hide_empty' => false'] ); if($terms) { foreach ($terms as $term){
echo "<span>{$term->name}</span>";}}
?>
Answer the question
In order to leave comments, you need to log in
Carefully read the documentation for the "get_terms" function you are using.
It has an argument that is responsible for the attached posts for which tags will be displayed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question