WordPress Code Snippets

A fresh mix of code snippets and tutorials

Display external feeds in WordPress

42

WordPress makes it so easy to display external RSS feeds anywhere in your theme.

To display, say, the RSS feed for WP-mix in your sidebar, open your theme’s sidebar.php file and add the following code:

<?php include_once(ABSPATH.WPINC.'/rss.php');
wp_rss('https://wp-mix.com/feed/', 5); ?>

This will display the latest 5 posts from the specified feed. Customize to suit your needs.

Learn more

WordPress Themes In Depth


Show Support

Like our new Facebook Page to show support!