检索帖子的标签。
原型
the_tags( string $before = null, string $sep = ', ', string $after = '' )
参数
$before
(string)
(Optional)
在列表之前。
$sep
(string)
(Optional)
使用此单独的项目。
$after
(string)
(Optional)
列表后。
源文件
路径:wp-includes/category-template.php
<?php
...
function the_tags( $before = null, $sep = ', ', $after = '' ) {
if ( null === $before )
$before = __('Tags: ');
$the_tags = get_the_tag_list( $before, $sep, $after );
if ( ! is_wp_error( $the_tags ) ) {
echo $the_tags;
}
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/the_tags/