Switch language

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




the_category_id [ WordPress Function ]

the_category_id ( $echo = true )
Parameters:
  • (bool) $echo
See:
Returns:
  • (null|int)
Defined at:



Return or Print Category ID.

Source


<?php
function the_category_ID($echo true) {
    
_deprecated_function__FUNCTION__'0.71''get_the_category()' );

    
// Grab the first cat in the list.
    
$categories get_the_category();
    
$cat $categories[0]->term_id;

    if ( 
$echo )
        echo 
$cat;

    return 
$cat;
}
?>

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