WordPress at a glance

the_taxonomies() WP 1.0

Display the taxonomies of a post with available options.

This function can be used within the loop to display the taxonomies for a post without specifying the Post ID. You can also use it outside the Loop to display the taxonomies for a specific post.

Works based on: get_the_taxonomies()
1 time = 0.009228s = very slow | 50000 times = 51.10s = very slow | PHP 7.1.2, WP 4.7.3

No Hooks.


Null. Nothing.


the_taxonomies( $args );

Arguments about which post to use and how to format the output. Shares all of the arguments supported by get_the_taxonomies(), in addition to the following.

  • int|WP_Post()
    $post Post ID or object to get taxonomies of.
    Default: current post

  • string()
    $before Displays before the taxonomies.
    Default: empty string

  • string()
    $sep Separates each taxonomy.
    Default: space

  • string()
    $after Displays after the taxonomies.
    Default: empty string

Default: array()


Since 2.5.0 Introduced.

Code of the_taxonomies() WP 5.6

function the_taxonomies( $args = array() ) {
	$defaults = array(
		'post'   => 0,
		'before' => '',
		'sep'    => ' ',
		'after'  => '',

	$parsed_args = wp_parse_args( $args, $defaults );

	echo $parsed_args['before'] . implode( $parsed_args['sep'], get_the_taxonomies( $parsed_args['post'], $parsed_args ) ) . $parsed_args['after'];

From category: For posts

More from Template Tags: Taxonomies (category, tag)

No comments
    Log In