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



the_tags ›

Since2.3.0
已弃用n/a
the_tags ( $before = null, $sep = ', ', $after = '' )
参数: (3)
  • (string) $before Optional. Before list.
    Required: No
    默认: null
  • (string) $sep Optional. Separate items using this.
    Required: No
    默认: ', '
  • (string) $after Optional. After list.
    Required: No
    默认: (empty)
定义在:
文档:

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