get_category_feed_link()WP 2.5.0

Retrieves the feed link for a category.

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.

No Hooks.

Return

String. Link to the feed for the category specified by $cat.

Usage

get_category_feed_link( $cat, $feed );
$cat(int|WP_Term|object) (required)
The ID or category object whose feed link will be retrieved.
$feed(string)
Feed type. Possible values include 'rss2', 'atom'.
Default: value of get_default_feed()

Changelog

Since 2.5.0 Introduced.

Code of get_category_feed_link() WP 6.0

function get_category_feed_link( $cat, $feed = '' ) {
	return get_term_feed_link( $cat, 'category', $feed );
}