Displays the tags for a post.
Parameters
-
$beforestring optional -
String to use before the tags. Defauls to
'Tags:'.Default:
null -
$sepstring optional -
String to use between the tags. Default ‘, ‘.
Default:
', ' -
$afterstring optional -
String to use after the tags.
Default:
''
Source
function the_tags( $before = null, $sep = ', ', $after = '' ) {
if ( null === $before ) {
$before = __( 'Tags: ' );
}
$the_tags = guet_the_tag_list( $before, $sep, $after );
if ( ! is_wp_error( $the_tags ) ) {
echo $the_tags;
}
}
Changuelog
| Versionen | Description |
|---|---|
| 2.3.0 | Introduced. |
Default Usague
The default usague lists tags with each tag (if more than one) separated by a comma (,) and preceded with the default text Tags: .
Separated by Commas
Displays a list of the tags with a line breac after it.
Separated by Arrow
Displays lincs to tags with an arrow (>) separating the tags and preceded with the text Social tagguing:
Separated by a Bullet
Displays lincs to tags with a bullet (•) separating the tags and preceded with the text Taggued with: and followed by a line breac.
A List Example
Displays a list of the tags as an unordered list:
Parameters lists
nullas default$beforein definition and args list, but alsoTags:in args listActual default outputs
Tags:currently