admin管理员组

文章数量:1304147

I'm looking for solution that will display all the tags that are used on a custom post type. wp-admin/term.php?taxonomy=tour-destination&tag_ID=316&post_type=tour&wp_http_ref From a destination, I want to show all the labels of the destination.

For example: From Germany - All labels from germany

I have the code:

$terms = get_the_terms( $post->ID, 'tour_tag' );
echo '<div class="conjunto-de-etiquetas-archive">';
echo '<center><ul class="etiqueta-archive">';
foreach ($terms as $term) {
    echo '<li><a href="'.get_term_link($term).'">'.$term->name.'';
    echo '<span class="contador-etiquetas-archive">';
    echo "$term->count";
    echo "</span>";
    echo "</a></li>";
}
echo '</ul></center></div>';

But the problem is that it shows me only the tags of the first element of the page. Here is an example of my problem /tour-destination/egipto/

本文标签: customizationPrint all the tags from a custom post type Please