On this page
get_category_feed_link( int|WP_Term|object $cat, string $feed = '' ): string
Retrieves the feed link for a category.
Description
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
$catint|WP_Term|object Required-
The ID or category object whose feed link will be retrieved.
$feedstring Optional-
Feed type. Possible values include
'rss2','atom'.
Default is the value of get_default_feed() .Default:
''
Return
string Link to the feed for the category specified by $cat.
Source
File: wp-includes/link-template.php. View all references
function get_category_feed_link( $cat, $feed = '' ) {
return get_term_feed_link( $cat, 'category', $feed );
}
Related
Uses
| Uses | Description |
|---|---|
| get_term_feed_link() wp-includes/link-template.php | Retrieves the feed link for a term. |
Used By
| Used By | Description |
|---|---|
| feed_links_extra() wp-includes/general-template.php | Displays the links to the extra feeds such as category feeds. |
| get_category_rss_link() wp-includes/deprecated.php | Print/Return link to category RSS2 feed. |
| wp_xmlrpc_server::mw_getCategories() wp-includes/class-wp-xmlrpc-server.php | Retrieve the list of categories on a given blog. |
Changelog
| Version | Description |
|---|---|
| 2.5.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_category_feed_link