get_the_category [ WordPress Function ]
get_the_category ( $id = false )
| Parameters: |
|
| Uses: |
|
| Returns: |
|
| Defined at: |
|
Benzer Fonksiyonlar: get_the_category_rss, get_the_category_list, get_category, the_category, get_the_category_by_id
Retrieve post categories.
Source
<?php
function get_the_category( $id = false ) {
$categories = get_the_terms( $id, 'category' );
if ( ! $categories )
$categories = array();
$categories = array_values( $categories );
foreach ( array_keys( $categories ) as $key ) {
_make_cat_compat( $categories[$key] );
}
// Filter name is plural because we return alot of categories (possibly more than #13237) not just one
return apply_filters( 'get_the_categories', $categories );
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- get_the_category() - WordPress Codex
Description. Returns an array of objects, one object for each category assigned to the post. This tag may be used outside The Loop by passing a post id as the ...
codex.wordpress.org - WordPress › Support » Tags — get_the_category
(forgot?) Register · WordPress › Support » get_the_category ...
wordpress.org - WordPress › Support » exclude a category from get_the_category
[resolved] exclude a category from get_the_category (12 posts). nathanielstern. Member Posted 4 years ago #. Basically, I'm using a specific/secret category to ...
wordpress.org - Category description with multiple categories and get_the_category ...
Jul 15, 2009 ... In this follow-up to a previous WordPress tutorial on how to display the Category description using get_the_category(), I look at how to deal with ...
www.studiograsshopper.ch
Kullanýcý Tartýþmalarý [ wordpress.org ]
- thomas514 on "Problem with get_the_category"
- ErikAtLarge on "'get_the_category_list' within 'the_content'"
- ArielZusya on "categories and subcategories loop in a page template"
- alchymyth on "categories and subcategories loop in a page template"
- ArielZusya on "categories and subcategories loop in a page template"
- alchymyth on "categories and subcategories loop in a page template"
- esmi on "categories and subcategories loop in a page template"
- ArielZusya on "categories and subcategories loop in a page template"
- AlphaGolf_fr on "Bug with WordPress get_the_category or get_category?"
- AlphaGolf_fr on "Bug with WordPress get_the_category or get_category?"