Function: get_the_category_rss

get_the_category_rss( string $type )

Retrieve all of the post categories, formatted for use in feeds.

Shortcut: gtcr

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.

All of the categories for the current post in the feed loop, will be retrieved and have feed markup added, so that they can easily be added to the RSS2, Atom, or RSS1 and RSS0.91 RDF feeds.


Name Type(s) Default Value Description
$type string null

Optional, default is the type returned by get_default_feed().



All of the post categories for displaying in the feed.

WordPress Developer Newsletter

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