Ready to get started?Download WordPress


Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Difference between revisions of "Function Reference/get category link"

(remove new page created)
(Using Parameter template)
Line 13: Line 13:
== Parameters ==
== Parameters ==
{{Parameter|$category_id|integer|The category ID whose link will be retrieved.}}
; category_id : (''numeric'') The Category ID.
== Related ==
== Related ==

Revision as of 02:46, 13 January 2008


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/


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


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


See also index of Function Reference and index of Template Tags.
This article is marked as in need of editing. You can help Codex by editing it.