Codex

Function Reference/get category link

Contents

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

$category_id
(integer) (required) The category ID whose link will be retrieved.
Default: None

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,

How to pass parameters to tags with PHP function-style parameters

Go to Template Tag index

This article is marked as in need of editing. You can help Codex by editing it.