Ok, I’ve been doing all sorts of things with WordPress for a while now, but oddly enough, I never actually wrote a plugin (although, in retrospect, I did a lot of template hacks that probably would have been easier to do as plugins). Anyway, I needed a plugin for a blog I was working on that would allow me to display the summary of N number of blog posts from another blog. There seem to be plenty of existing plugins that do this, however most of them are either horrible code (both HTML and PHP), or they don’t work with Atom feeds that don’t have descriptions. I wanted something very simple, with very clean output that would ‘just work’™. So, after trying about a dozen of them, I decided to just write my own (which turned out to be insanely easy). If I would have started down that path at first, I probably would have been done sooner.
So, if anyone is interested in this very simple plugin, here it is. Of course, it’s GPL. I expect I’ll be adding more features to it as I need, but for now this does exactly what I want with very little code to maintain.
Documentation
Download
You can get the current version from here: simplerssembed.zip
Installation
Put the contents of simpleressembed.zip into your wp-contents/plugins directory, and unzip it. This should give you a directory called ‘simpleressembed’ which has 3 things in it:
- an empty directory called ‘cache’
- a file called readme.txt
- a file called simplerssembed.php
Make sure that the cache directory is writeable by your web server, or whatever user that will be executing the php scripts. The safest way (on *nix system) is to do the following (assuming that the process runs as the user ‘apache’:
[root@ simplerssembed]# chown apache: cache
[root@ simplerssembed]# chmod 755 cache
Then go to the plugins tool in your WP dashboard, and activate the plugin.
Using the plugin
Once the plugin is activated, you can embed RSS feeds with the following shortcode:
[simplerssembed rssfeed='http://wordpress.org/news/feed/'
rssitems='5' rsscssclass="rssfeeditem"
rssdateformat="j F Y" rsslinktarget="_new"]
Parameters
The currently defined parameters are as follows:
rssfeed -> URI of the RSS feed
rssitems -> The number of items to display
rssmaxdescription -> The maximum number of summary characters to display
rsscssclass -> The class name to give the containing <div> (per item)
rsslinktarget -> The target attribute for the link to the post
rsscacheduration -> The duration (in seconds) of the cache
rssdateformat -> The data format (see PHP's date function)
Default values
The default values for the above parameters are:
rssfeed => 'http://wordpress.org/news/feed/'
rssitems => '5'
rssmaxdescription => '400'
rsscssclass => 'rssitem'
rsslinktarget => '_self'
rsscacheduration => '3600'
rssdateformat => 'j F Y | g:i a'
Example output:
This is output from the actual code above:
Portland Welcomes WordCamp US 2025: A Community Gathering
A full house of attendees gathered in Portland, Oregon, for WordCamp US 2025, with thousands more tuning in online. Over four days, the flagship WordPress event brought together contributors, innovators, and community members for collaboration, inspiration, and discovery. WordPress is so unique because we’re not just a product; we’re a movement. Matt Mullenweg, WordPress Cofounder […]
Posted on 30 August 2025
Portland, Are You Ready? The WCUS 2025 Schedule Has Arrived!
We’re excited to announce that the full schedule for WordCamp US 2025 has been published! From August 26–29 in Portland, Oregon, join web creators, innovators, and community leaders for four days of learning, collaboration, and inspiration. This year’s lineup brings together sessions on everything from cutting-edge AI to hands-on workshops, performance, accessibility, design, and the […]
Posted on 6 August 2025
Maintenance Releases for WordPress branches 4.7 to 6.7
Following on from the WordPress 6.8.2 maintenance release last month, the included update to the root security certificate bundle has been backported to all branches back to 4.7. This ensures that when your site performs server-side HTTP requests, the most up-to-date information about trusted security certificates is used. Further information can be found on the […]
Posted on 5 August 2025
WordPress 6.8.2 Maintenance Release
WordPress 6.8.2 is now available! This minor release includes fixes for 20 Core tickets and 15 Block Editor issues. For a full list of bug fixes, please refer to the release candidate announcement. WordPress 6.8.2 is a short-cycle maintenance release. More maintenance releases may be made available throughout 2025. If you have sites that support […]
Posted on 15 July 2025
Celebrating Kim Parsell: 2025 WordCamp US Scholarship Applications Open
The WordPress Foundation is pleased to announce the return of the Kim Parsell Memorial Scholarship for WordCamp US 2025. Applications are being accepted until July 25, 2025. Remembering Kim Parsell Kim Parsell was a dedicated contributor and a beloved member of the WordPress community. Her passion for open source and her welcoming spirit inspired many, […]
Posted on 14 July 2025