Core Function
View Source on Trac ↗ get_the_tags()
get_the_tags( mixed $post = 0 ) Retrieves the tags for a post.
Parameters 1 required
| Name / Type | Description |
|---|---|
| (int | | WP_Post) $post Post ID or object. Required |
Return Value
((WP_Term[])
(WP_Term[] | false | WP_Error) Array of WP_Term objects on success, false if there are no terms
or the post does not exist, WP_Error on failure.
Function Information
Since Version
2.3.0
Source File
wp-includes/category-template.php
Advertisement