WPDev.one
Core Function
View Source on Trac ↗

get_the_tag_list()

get_the_tag_list( mixed $before = '', mixed $sep = '', mixed $after = '', mixed $post_id = 0 )

Retrieves the tags for a post formatted as a string.

Parameters 0 required

Name / Type Description
$before
string

Optional. String to use before the tags. Default empty.

$sep
string

Optional. String to use between the tags. Default empty.

$after
string

Optional. String to use after the tags. Default empty.

$post_id
int

Optional. Post ID. Defaults to the current post ID.

Return Value

((string)
(string | false | WP_Error) A list of tags on success, false if there are no terms, WP_Error on failure.

Function Information

Since Version
2.3.0
Source File
wp-includes/category-template.php
Advertisement