Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




the_taxonomies [ WordPress Function ]

the_taxonomies ( $args = array() )
Parameters:
  • (array) $args Override the defaults.
Uses:
Defined at:



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.

Source


<?php
function the_taxonomies($args = array()) {
    
$defaults = array(
        
'post' => 0,
        
'before' => '',
        
'sep' => ' ',
        
'after' => '',
        
'template' => '%s: %l.'
    
);

    
$r wp_parse_args$args$defaults );
    
extract$rEXTR_SKIP );

    echo 
$before join($sepget_the_taxonomies($post$r)) . $after;
}
?>

Examples [ wp-snippets.com ]

Top Google Search Results

More ...

User discussions [ wordpress.org ]

0 User Note(s)

None yet. Be the first!

Add New ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics