After every post I am displaying tags
<?php
 global $post;
 foreach(get_the_tags($post->ID) as $tag) {
  echo '<li>'.$tag->name.'</li>';
  }
?>
Now I need to display tag not just as text but as a link that would display all posts filtered by given tag, just like on stackoverflow when you click a tag below the question.
- How to make it?
- What page template will be used to display searc开发者_高级运维h results?
<?php
global $post;
foreach(get_the_tags($post->ID) as $tag)
{
    echo '<li><a href="' . get_tag_link($tag->term_id) . '">' . $tag->name . '</a></li>';
}
What page template will be used to display search results : for the search template you can follow me for the tags template Tag_Template
<a href="<?php echo get_tag_link($tag_id); ?>">tag name</a>
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论