get_rss [ WordPress Function ]
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Display RSS items in HTML list items.
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.
Source
<?php
function get_rss ($url, $num_items = 5) { // Like get posts, but for RSS
$rss = fetch_rss($url);
if ( $rss ) {
$rss->items = array_slice($rss->items, 0, $num_items);
foreach ( (array) $rss->items as $item ) {
echo "<li>\n";
echo "<a href='$item[link]' title='$item[description]'>";
echo esc_html($item['title']);
echo "</a><br />\n";
echo "</li>\n";
}
} else {
return false;
}
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- get_rss - WordPress Codex
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.
codex.wordpress.org - WordPress › Support » Tags — get_rss
Forums. Username or Email Address Password (forgot?) Register · WordPress › Support » get_rss. Tag: get_rss Add New » ...
wordpress.org - 5 Useful WordPress Functions You Didn't Know Existed - Nathan Rice
Jun 3, 2009 ... 5. wp_rss() / get_rss() ... Will have to play around with get_rss(); Thanks. ... Not sure though about get_rss(), since this relies on Magpie which is ...
www.nathanrice.net - Sitemap - Financial Mirror
... monthly http://www.financialmirror.com/get_rss/newsCategory_1/ monthly http:/ /www.financialmirror.com/get_rss/newsCategory_2/ monthly ...
www.financialmirror.com
Gebruikersdiscussies [ wordpress.org ]
- kmessinger on "Problem importing an RSS feed into my Wordpress blog"
- babypress on "Problem importing an RSS feed into my Wordpress blog"
- wasnotwas on "Problem importing an RSS feed into my Wordpress blog"
- kmessinger on "Problem importing an RSS feed into my Wordpress blog"
- wasnotwas on "Problem importing an RSS feed into my Wordpress blog"
- kmessinger on "Problem importing an RSS feed into my Wordpress blog"
- wasnotwas on "Problem importing an RSS feed into my Wordpress blog"
- kmessinger on "Problem importing an RSS feed into my Wordpress blog"
- wasnotwas on "Problem importing an RSS feed into my Wordpress blog"
- wasnotwas on "Problem importing an RSS feed into my Wordpress blog"