• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WordPress core a2z

WordPress core a2z

WordPress core only

  • Home
  • Plugins
  • Blocks
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / the_taxonomies() – Display the taxonomies of a post with available options.

You appear to be a bot. Output may be restricted

Description

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.

Usage

the_taxonomies( $args );

Parameters

$args
( array ) optional – { 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.
$post
( int|WP_Post ) optional – Post ID or object to get taxonomies of. Default current post.
$before
( string ) optional – Displays before the taxonomies. Default empty string.
$sep
( string ) optional – Separates each taxonomy. Default is a space.
$after
( string ) optional – Displays after the taxonomies. Default empty string. }

Returns

void

Source

File name: wordpress/wp-includes/taxonomy.php


Lines:

1 to 13 of 13
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'];
}
 

 View on GitHub View on Trac

Published: 25th November 2019 | Last updated: 9th December 2020

Primary Sidebar

Information

Function name: the_taxonomies
Plugin ref: WordPress
Version: 5.6
Sourcefile: wp-includes/taxonomy.php
File ref: wp-includes/taxonomy.php
Deprecated?: No
API Letters: T

Footer

WP-a2z
WordPress core a2z
WordPress core only
WordPress 5.6
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  core.wp-a2z.org
© Copyright WP-a2z 2014-2021. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites