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
版权声明:本文标题:customization - Print all the tags from a custom post type Please 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741780868a2397299.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论