the_category_head [ WordPress Function ]
the_category_head ( $before = '', $after = '' )
| Parameters: |
|
| See: |
|
| Defined at: |
|
Benzer Fonksiyonlar: the_category_id, the_category, the_category_rss, update_category_cache, get_the_category
Print category with optional text before and after.
Source
<?php
function the_category_head($before='', $after='') {
global $currentcat, $previouscat;
_deprecated_function( __FUNCTION__, '0.71', 'get_the_category_by_ID()' );
// Grab the first cat in the list.
$categories = get_the_category();
$currentcat = $categories[0]->category_id;
if ( $currentcat != $previouscat ) {
echo $before;
echo get_the_category_by_ID($currentcat);
echo $after;
$previouscat = $currentcat;
}
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Function Reference/the category head « WordPress Codex
Description. Displays the name of a category if it's different from the previous category. This tag must be used within The Loop.
codex.wordpress.org - WordPress › Support » Single Category Title Outside The Loop
http://codex.wordpress.org/Template_Tags/the_category_head. To get the categor(y|ies) outside The Loop on a single post page, use something like the ...
wordpress.org - Template Tags/the category head − WordDoku
[bearbeiten] Auslaufend. Diese Funktion wird ab einer der nächsten WordPress- Versionen nicht mehr unterstützt und wird daher nicht mehr übersetzt!
doku.wpde.org - テンプレートタグ/the category head - WordPress Codex 日本語版
2008年5月4日 ... テンプレートタグ/the category head ... 使い方. <?php the_category_head('before', ' after'); ?> ... <h2><?php the_category_head('Category: '); ?> ...
wpdocs.sourceforge.jp