个人工具
名字空间
变换
操作

WordPress:Function Reference/get category link

来自站长百科
跳转到: 导航, 搜索

目录

描述

为一个特定的类别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,

Template:PHP Function Tag Footer

留言