term_description [ WordPress Function ]
term_description ( $term = 0, $taxonomy = 'post_tag' )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Benzer Fonksiyonlar: tag_description, category_description, the_author_description, wp_sidebar_description, get_file_description
Retrieve term description.
Source
<?php
function term_description( $term = 0, $taxonomy = 'post_tag' ) {
if ( !$term && ( is_tax() || is_tag() || is_category() ) ) {
$term = get_queried_object();
$taxonomy = $term->taxonomy;
$term = $term->term_id;
}
$description = get_term_field( 'description', $term, $taxonomy );
return is_wp_error( $description ) ? '' : $description;
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Function Reference/term description « WordPress Codex
Description. First available with WordPress Version 2.8, this template tag returns the description of a given term. A term ID and taxonomy are as parameters.
codex.wordpress.org - WordPress › Support » term_description in a page template
I'd like to display a taxonomy term_description on a 'page template' - not a taxonomy or post template. The page has a standard loop bringing in the usual page ...
wordpress.org - term_description help - WordPress - Stack Exchange
Dec 15, 2010 ... <div class="featured post"> <p><?php if ( is_tax( 'location' ) ) { echo term_description(); } elseif (is_tax('mba_courses')){ echo term_description() ...
wordpress.stackexchange.com - Using term_description as keyword meta - Make Some Code
Apr 4, 2012 ... I found a good use for WordPress's taxonomy description. I'm using it to display keywords for the meta tag. When a user visits the archive page ...
makesomecode.com
Kullanýcý Tartýþmalarý [ wordpress.org ]
- vtxyzzy on "term_description in a page template"
- MAS on "term_description in a page template"
- daztayor on "term_description in a page template"
- vtxyzzy on "term_description in a page template"
- daztayor on "term_description in a page template"
- peskyeskimo on "Issues with term_description"
- Digital Raindrops on "Issues with term_description"
- peskyeskimo on "Issues with term_description"