WordPress 中文文档

Function Reference/get category link

From WordPress Chinese

Jump to: navigation, search

目录

Description

Returns the correct url for a given Category ID.

This is a category id of blog posts, not links.

Using a nonexistent Category ID will return a link to the parent directory

eg: http://yoursite.com/baseurl/archives/category/

Usage

%%% <a href="<?php echo get_category_link($cat);?>">category name</a> %%%

Parameters

Template:Parameter

Related

Template:Tag Category Tags

Template:PHP Function Tag FooterTemplate:Copyedit

用户