Ready to get started?Download WordPress


Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wp rss

This function has been deprecated. That means it has been replaced by a new function or is no longer supported, and may be removed from future versions. All code that uses this function should be converted to use its replacement if one exists. See also wp-includes/deprecated.php. Use any of these functions instead.


Retrieves an RSS feed and parses it, then displays it as an unordered list of links. Uses the MagpieRSS and RSSCache functions for parsing and automatic caching and the Snoopy HTTP client for the actual retrieval.

Deprecated note: Switch to using fetch_feed instead.


include_once(ABSPATH WPINC '/rss.php');


(URI) (required) The URI of the RSS feed you want to retrieve. The resulting parsed feed is returned, with the more interesting and useful bits in the items array.
Default: None
(integer) (required) The number of items to display.
Default: None


The output will look like the following:

(repeat for number of links specified)


To get and display a list of 5 links from an existing RSS feed:

include_once(ABSPATH WPINC '/rss.php');


fetch_rss, get_rss

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