WordPress:Template Tags/category description

来自站长百科
Fludlen讨论 | 贡献2008年6月28日 (六) 17:10的版本
跳转至: 导航、​ 搜索

Description

描述

Returns the description of a category. 返回类别描述。

Usage

用法

%%% <?php category_description(category); ?> %%%

%%% <?php category_description(category); ?> %%%

Examples

例子

Default Usage

默认用法

Displays the description of a category with ID 3 by echoing the return value of the tag.

显示ID为3的类别描述,echoing标签的返回值。

<p><?php echo category_description(3); ?></p>
WordPress is a favorite blogging tool of mine and I share tips and tricks for using WordPress here.

<p><?php echo category_description(3); ?></p>

WordPress 是我最喜爱的一个写博客的工具,我在这里分享使用WordPress的小贴士和方法技巧。

With Category Title

用类别标题

<p><strong><?php single_cat_title('Currently browsing'); ?>
</strong>: <?php echo category_description(); ?></p>
<p><strong><?php single_cat_title('当期浏览'); ?>
</strong>: <?php echo category_description(); ?></p>
Currently browsing WordPress: WordPress is a favorite blogging tool of mine and I share tips and tricks for using WordPress here.
当前浏览 WordPress: WordPress 是我最喜爱的一个写博客的工具,我在这里分享使用WordPress的小贴士和方法技巧。

Parameters

参数

category
(integer) The numeric ID of the category for which the tag is to return the description. Defaults to the current category, if one is not set.
类别
(整数) 标签需要返回描述的类别的ID数。如果没有设置,默认为当前的类别。

Related

the_category, the_category_rss, single_cat_title, category_description, wp_dropdown_categories, wp_list_categories, in_category, get_category_parents, get_the_category get_category_link,

模板:Tag Footer

相关的

the_category, the_category_rss, single_cat_title, category_description, wp_dropdown_categories, wp_list_categories, in_category, get_category_parents, get_the_category get_category_link