Function: get_category_feed_link

get_category_feed_link( integer $cat_id, string $feed )

Retrieves the feed link for a category.

Shortcut: gcfl

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.

Returns a link to the feed for all posts in a given category. A specific feed can be requested or left blank to get the default feed.

Parameters

Name Type(s) Default Value Description
$cat_id integer

Category ID.

$feed string ''

Optional. Feed type. Default empty.

Returns

string

Link to the feed for the category specified by $cat_id.

WordPress Developer Newsletter

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