the_tags( string $before = null, string $sep = ', ', string $after = '' )

Retrieve the tags for a post.


Description


Parameters

$before

(string) (Optional) Before list.

Default value: null

$sep

(string) (Optional) Separate items using this.

Default value: ', '

$after

(string) (Optional) After list.

Default value: ''


Top ↑

Source

File: wp-includes/category-template.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;
	}
}

Top ↑

Changelog

Version Description
2.3.0 Introduced.