Codex tools: Log in / create account
Languages: English • Türkçe • (Add your language)
Contents |
This template tag displays a link to the tag or tags a post belongs to. If no tags are associated with the current entry, the associated category is displayed instead. This tag should be used within The Loop.
<?php the_tags( $before, $separator, $after ); ?>
The default usage lists tags with each tag (if more than one) separated by a comma (,) and preceded with the default text Tags: .
<p><?php the_tags(); ?></p>
Displays a list of the tags with a line break after it.
<?php the_tags('Tags:', ', ', '<br />'); ?>
Displays links to tags with an arrow (>) separating the tags and preceded with the text Social tagging:
<?php the_tags('Social tagging: ',' > '); ?>
Displays links to tags with a bullet (•) separating the tags and preceded with the text Tagged with: and followed by a line break.
<?php the_tags('Tagged with: ',' • ','<br />'); ?>
Displays a list of the tags as an unordered list:
<?php the_tags('<ul><li>','</li><li>','</li></ul>'); ?>
Since: 2.3.0
the_tags, tag_description, single_tag_title, wp_tag_cloud, wp_generate_tag_cloud, get_tags, get_the_tags, get_the_tag_list, get_tag_link