Codex

Function Reference/get category feed link

Contents

Description

This function returns a link to the feed for all posts in the specified category. A particular feed can be requested, but if the feed parameter is left blank, it returns the 'rss2' feed link.

Usage

 <?php get_category_feed_link$cat_id$feed ); ?> 

Parameters

$cat_id
(string) (required) Category ID of feed link to return.
Default: None
$feed
(string) (optional) Type of feed, accepts 'rss2' or 'atom'.
Default: rss2

Examples

Return the rss2 feed link for post in category 2

<?php get_category_feed_link('2', ''); ?>

Notes

  • Since: 2.5.0
  • This function replaces the deprecated get_category_rss_link function.

Related

See also index of Function Reference and index of Template Tags.