Function: get_rss

get_rss( string $url, integer $num_items )

Display RSS items in HTML list items.

Shortcut: gr

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.

You have to specify which HTML list you want, either ordered or unordered before using the function. You also have to specify how many items you wish to display. You can't display all of them like you can with wp_rss() function.

Parameters

Name Type(s) Default Value Description
$url string

URL of feed to display. Will not auto sense feed URL.

$num_items integer 5

Optional. Number of items to display, default is all.

Returns

boolean

False on failure.

WordPress Developer Newsletter

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