News feeds, or receiving the news, is the web channel that allows you to see new content on sites that support this system. Receiving news is also known by the acronym RSS. While there is some disagreement about the meaning of these abbreviations, most Internet users support the name “Really Simple Syndication”. Essentially reception of news represented ordinary web pages that are formatted for reading in specific programs instead of standard web browsers.

If you want on your WordPress site to display news from external sources, you can use existing RSS widget. Imperfection of this widget is that the news show only within sidebar. If you want to integrate the news anywhere within the themes, then the following code is right solution

1
2
3
4
5
6
7
8
9
10
11
12
<?php
include_once(ABSPATH . WPINC . '/feed.php');
$rss = fetch_feed('http://www.nekiwebsajt.com/feed');
$rss_items = $rss->get_items( 0, $rss->get_item_quantity(5) );
if ( !$rss_items ) {
echo 'Ne radi feed...';
} else {
foreach ( $rss_items as $item ) {
echo '<ul><li><a href="' . $item->get_permalink() . '">' . $item->get_title() . '</a></li></ul>';
}
}
?>