WordPress:Function Reference/get category link

来自站长百科
Xxf3325讨论 | 贡献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