/ Published in: PHP
Display any rss feed as html in wordpress
Expand |
Embed | Plain Text
<?php include_once(ABSPATH.WPINC.'/feed.php'); $rss = fetch_feed('http://feeds.feedburner.com/wpbeginner'); $maxitems = $rss->get_item_quantity(5); $rss_items = $rss->get_items(0, $maxitems); ?> <ul> else // Loop through each feed item and display each item as a hyperlink. foreach ( $rss_items as $item ) : ?> <li> </li> <?php endforeach; ?> </ul>
You need to login to post a comment.
