wpseek.com
A WordPress-centric search engine for devs and theme authors



the_tags › WordPress Function

Since2.3.0
Deprecatedn/a
the_tags ( $before = null, $sep = ', ', $after = '' )
Parameters: (3)
  • (string) $before Optional. String to use before the tags. Defaults to 'Tags:'.
    Required: No
    Default: null
  • (string) $sep Optional. String to use between the tags. Default ', '.
    Required: No
    Default: ', '
  • (string) $after Optional. String to use after the tags. Default empty.
    Required: No
    Default: (empty)
Defined at:
Codex:

Displays the tags for a post.



Source

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