WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/the taxonomies

Description

This template tag can be used within The Loop to display Links for taxonomies and belonging Terms 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

 <?php the_taxonomies$args ); ?> 

Parameters

post
(int) (optional) The post ID to get taxonomies of.
Default: 0
before
(string) (optional) Display before taxonomies list.
Default: None
sep
(string) (optional) Separate every taxonomy with value in this.
Default: ' '
after
(string) (optional) Display this after the taxonomies list.
Default: None
template
(string) (optional) Template used to display the taxonomies list.
Default: '%s: %l.'

Returns

A List of Links to your Tags in the taxonomies

Taxonomy Name: <a href="http://example.com/term_slug/">Term Name</a>, <a href="http://example.com/term_slug-2/">Term Name 2</a>, and <a href="http://example.com/term_slug-3/">Term Name 3</a>, .

Example

<?php the_taxonomies'before=<ul>&after=</ul>' ); ?>  <?php 
$args 
= array(
    
//default to current post
    
'post' => 0,
    
'before' => '<p class="meta">',
    
//this is the default
    
'sep' => ' ',
    
'after' => '<p class="meta">',
    
//this is the default
    
'template' => '%s: %l.'
);
the_taxonomies$args ); 
?> 

Source File

the_taxonomies() is located in wp-includes/taxonomy.php.

Related

get_the_taxonomies, the_tags, the_category

See also index of Function Reference and index of Template Tags.