Getting the current tag in template
-
I am using a Posts shortcode do display a list of posts based on a Tag. The shortcode looks like this:
[su_posts template=”templates/CustomTemplate.php” posts_per_page=”4″ taxonomy=”post_tag” tax_term=”265″ order=”desc”]
I have created a custom template to display the list of posts returned by the shortcode. At the bottom of the list, I would like to display a link to display all the posts that have that tag. Question: how do I get the permalink to the Tag that has been used for the query (considering that I want to make the template generic, so I don’t want to hard-code the tag ID)?
The topic ‘Getting the current tag in template’ is closed to new replies.