Answer the question
In order to leave comments, you need to log in
Why duplicate labels in wordpress?
Faced such a problem. Labels are duplicated on the blog, starting from the first entry, the label is added to all previously added ones. Here's what it looks like:
The actual code:
<?php
$posttags = get_the_tags();
if ($posttags) {
?>
<span class="root">
<i class="icon icon-root"></i>
<?php foreach($posttags as $tag) {
$tag_links[] = '<a href="' . get_tag_link($tag->term_id) . '">' . $tag->name . '</a>';
}
echo join( ', ', $tag_links );
}
?>
</span>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question