Function: get_category_link

get_category_link( integer | object $category )

Retrieve category link URL.

Shortcut: gcl

You can use above key combination to trigger the associated snippet for this function in the WordPress Snippets for Visual Studio Code extension. You can also use this shortcut to search for this function on this website.


Name Type(s) Default Value Description
$category integer | object

Category ID or object.



Link on success, empty string if category does not exist.

WordPress Developer Newsletter

Stay informed of new chapter releases, important WordPress API updates and more.