Switch language

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




get_the_category_by_id [ WordPress Function ]

get_the_category_by_id ( $cat_ID )
Parameters:
  • (int) $cat_ID Category ID.
Returns:
  • (string) Category name.
Defined at:



Retrieve category name based on category ID.

Source


<?php
function get_the_category_by_ID$cat_ID ) {
    
$cat_ID = (int) $cat_ID;
    
$category = &get_category$cat_ID );
    if ( 
is_wp_error$category ) )
        return 
$category;
    return 
$category->name;
}
?>

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