Let's use my personal example—I have two blogs, catswhocode.com
and wprecipes.com
. In order to get one blog to promote the other, and vice-versa, why not put a list of posts from one blog in a separate page or in the sidebar of the other.
Let's see how we can display any RSS feed on a WordPress blog, without even using a plugin.
Do
you know that WordPress has a function, called wp_rss()
, that is simply a built-in RSS reader? It is used on the WordPress dashboard, to display news from the WP team.
Edit your sidebar, or create a page template (refer to Chapter 3 for using and creating page templates).
Paste the following code where you'd like to display the feed item. It can be a page template, your sidebar (
sidebar.php
), or your blog footer (footer.php
):Save the file and visit the page that you just edited. It...