Switch language

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




term_description [ WordPress Function ]

term_description ( $term = 0, $taxonomy = 'post_tag' )
Parameters:
  • (int) $term Optional. Term ID. Will use global term ID by default.
  • (string) $taxonomy Optional taxonomy name. Defaults to 'post_tag'.
Returns:
  • (string) Term description, available.
Defined at:



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ý

Dahasý ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



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