wpseek.com
WordPress开发者和主题制作者的搜索引擎



the_tags › WordPress Function

Since2.3.0
已弃用n/a
the_tags ( $before = null, $sep = ', ', $after = '' )
参数: (3)
  • (string) $before Optional. String to use before the tags. Defaults to 'Tags:'.
    Required: No
    默认: null
  • (string) $sep Optional. String to use between the tags. Default ', '.
    Required: No
    默认: ', '
  • (string) $after Optional. String to use after the tags. Default empty.
    Required: No
    默认: (empty)
定义在:
文档:

Displays the tags for a post.



源码

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;
	}
}