the_tags() WP 1.0
Retrieve the tags for a post.
Works based on: get_the_tag_list()
1 time = 0.005842s = very slow | 50000 times = 5.53s = fast | PHP 7.1.2, WP 4.7.3
No Hooks.
Return
Null. Nothing.
Usage
the_tags( $before, $sep, $after );
- $before(string)
- String to use before the tags.
Default: 'Tags:' - $sep(string)
- String to use between the tags.
Default: ', ' - $after(string)
- String to use after the tags.
Default: ''
Changelog
Since 2.3.0 | Introduced. |
Code of the_tags() the tags WP 5.6
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;
}
}Related Functions
From tag: WP Loop
More from category: For posts
- get_object_taxonomies()
- get_objects_in_term()
- get_the_category()
- get_the_category_list()
- get_the_taxonomies()
- get_the_term_list()
- get_the_terms()
- has_category()
More from Template Tags: Posts, Pages, ...
- body_class()
- get_post_format()
- get_post_time()
- get_the_date()
- have_posts()
- in_the_loop()
- next_image_link()
- next_post_link()
- next_posts_link()
- post_class()