WordPress: Function Reference/get category link:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
 
第19行: 第19行:


== 相关的 ==
== 相关的 ==
{{Tag Category Tags}}
{{PHP Function Tag Footer}}

2008年9月27日 (六) 15:04的最新版本

描述[ ]

为一个特定的类别ID返回正确的url。

这是博客文章的一个类别id,而不是链接。

使用不存在的ID会返回一个链接,链接到母目录

例子: http://yoursite.com/baseurl/archives/category/

用法[ ]

<a href="%%%<?php echo get_category_link($cat);?>%%%">类别 名</a>

参数[ ]

相关的[ ]

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,

模板:PHP Function Tag Footer