A fresh mix of code snippets and tutorials

Display external feeds in WordPress

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

Digging Into WordPressWordPress Themes In DepthWizard’s SQL Recipes for WordPress