the_taxonomies

The timeline below displays how wordpress function the_taxonomies has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Displays 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.
 *
 * @since 2.5.0
 *
 * @param array $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.
 *
 *     @type int|WP_Post $post   Post ID or object to get taxonomies of. Default current post.
 *     @type string      $before Displays before the taxonomies. Default empty string.
 *     @type string      $sep    Separates each taxonomy. Default is a space.
 *     @type string      $after  Displays after the taxonomies. Default empty string.
 * }
 */
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'];
}

WordPress Version: 5.9

/**
 * 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.
 *
 * @since 2.5.0
 *
 * @param array $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.
 *
 *     @type int|WP_Post $post   Post ID or object to get taxonomies of. Default current post.
 *     @type string      $before Displays before the taxonomies. Default empty string.
 *     @type string      $sep    Separates each taxonomy. Default is a space.
 *     @type string      $after  Displays after the taxonomies. Default empty string.
 * }
 */
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'];
}

WordPress Version: 5.6

/**
 * 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.
 *
 * @since 2.5.0
 *
 * @param array $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.
 *
 *     @type  int|WP_Post $post   Post ID or object to get taxonomies of. Default current post.
 *     @type  string      $before Displays before the taxonomies. Default empty string.
 *     @type  string      $sep    Separates each taxonomy. Default is a space.
 *     @type  string      $after  Displays after the taxonomies. Default empty string.
 * }
 */
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'];
}

WordPress Version: 5.3

/**
 * 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.
 *
 * @since 2.5.0
 *
 * @param array $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.
 *
 *     @type  int|WP_Post $post   Post ID or object to get taxonomies of. Default current post.
 *     @type  string      $before Displays before the taxonomies. Default empty string.
 *     @type  string      $sep    Separates each taxonomy. Default is a space.
 *     @type  string      $after  Displays after the taxonomies. Default empty string.
 * }
 */
function the_taxonomies($args = array())
{
    $defaults = array('post' => 0, 'before' => '', 'sep' => ' ', 'after' => '');
    $parsed_args = wp_parse_args($args, $defaults);
    echo $parsed_args['before'] . join($parsed_args['sep'], get_the_taxonomies($parsed_args['post'], $parsed_args)) . $parsed_args['after'];
}

WordPress Version: 4.5

/**
 * 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.
 *
 * @since 2.5.0
 *
 * @param array $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.
 *
 *     @type  int|WP_Post $post   Post ID or object to get taxonomies of. Default current post.
 *     @type  string      $before Displays before the taxonomies. Default empty string.
 *     @type  string      $sep    Separates each taxonomy. Default is a space.
 *     @type  string      $after  Displays after the taxonomies. Default empty string.
 * }
 */
function the_taxonomies($args = array())
{
    $defaults = array('post' => 0, 'before' => '', 'sep' => ' ', 'after' => '');
    $r = wp_parse_args($args, $defaults);
    echo $r['before'] . join($r['sep'], get_the_taxonomies($r['post'], $r)) . $r['after'];
}

WordPress Version: 4.3

/**
 * 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.
 *
 * @since 2.5.0
 *
 * @param array $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.
 *
 *     @type  int|WP_Post $post   Post ID or object to get taxonomies of. Default current post.
 *     @type  string      $before Displays before the taxonomies. Default empty string.
 *     @type  string      $sep    Separates each taxonomy. Default is a space.
 *     @type  string      $after  Displays after the taxonomies. Default empty string.
 * }
 * @param array $args See {@link get_the_taxonomies()} for a description of arguments and their defaults.
 */
function the_taxonomies($args = array())
{
    $defaults = array('post' => 0, 'before' => '', 'sep' => ' ', 'after' => '');
    $r = wp_parse_args($args, $defaults);
    echo $r['before'] . join($r['sep'], get_the_taxonomies($r['post'], $r)) . $r['after'];
}

WordPress Version: 4.1

/**
 * 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.
 *
 * @since 2.5.0
 *
 * @param array $args {
 *     Arguments about which post to use and how to format the output. Shares all of the arguments supported by
 *     {@link get_the_taxonomies()}, in addition to the following.
 *
 *     @type  int|WP_Post $post   Post ID or object to get taxonomies of. Default current post.
 *     @type  string      $before Displays before the taxonomies. Default empty string.
 *     @type  string      $sep    Separates each taxonomy. Default is a space.
 *     @type  string      $after  Displays after the taxonomies. Default empty string.
 * }
 * @param array $args See {@link get_the_taxonomies()} for a description of arguments and their defaults.
 */
function the_taxonomies($args = array())
{
    $defaults = array('post' => 0, 'before' => '', 'sep' => ' ', 'after' => '');
    $r = wp_parse_args($args, $defaults);
    echo $r['before'] . join($r['sep'], get_the_taxonomies($r['post'], $r)) . $r['after'];
}

WordPress Version: 4.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.
 *
 * The available defaults are:
 * 'post' : default is 0. The post ID to get taxonomies of.
 * 'before' : default is empty string. Display before taxonomies list.
 * 'sep' : default is empty string. Separate every taxonomy with value in this.
 * 'after' : default is empty string. Display this after the taxonomies list.
 * 'template' : The template to use for displaying the taxonomy terms.
 *
 * @since 2.5.0
 * @uses get_the_taxonomies()
 *
 * @param array $args Override the defaults.
 */
function the_taxonomies($args = array())
{
    $defaults = array(
        'post' => 0,
        'before' => '',
        'sep' => ' ',
        'after' => '',
        /* translators: %s: taxonomy label, %l: list of term links */
        'template' => __('%s: %l.'),
    );
    $r = wp_parse_args($args, $defaults);
    echo $r['before'] . join($r['sep'], get_the_taxonomies($r['post'], $r)) . $r['after'];
}

WordPress Version: 3.7

/**
 * 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.
 *
 * The available defaults are:
 * 'post' : default is 0. The post ID to get taxonomies of.
 * 'before' : default is empty string. Display before taxonomies list.
 * 'sep' : default is empty string. Separate every taxonomy with value in this.
 * 'after' : default is empty string. Display this after the taxonomies list.
 * 'template' : The template to use for displaying the taxonomy terms.
 *
 * @since 2.5.0
 * @uses get_the_taxonomies()
 *
 * @param array $args Override the defaults.
 */
function the_taxonomies($args = array())
{
    $defaults = array('post' => 0, 'before' => '', 'sep' => ' ', 'after' => '', 'template' => '%s: %l.');
    $r = wp_parse_args($args, $defaults);
    extract($r, EXTR_SKIP);
    echo $before . join($sep, get_the_taxonomies($post, $r)) . $after;
}