SimpleRSSEmbed – my first WordPress plugin

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:

WordPress 7.2 Release Candidate 4

This version of the WordPress software is still under development. Please do not install, run, or test this version of WordPress on production or mission-critical websites. Instead, it’s recommended to evaluate RC4 on a test server and site. WordPress testing methods Plugin Install and activate the WordPress Beta Tester plugin on a WordPress install. (Select […]

Posted on 1 December 2026

WordPress 7.2 Release Candidate 3

Release Candidate 3 (“RC3”) for WordPress 7.2 is ready for download and testing! This version of the WordPress software is still under development. Please do not install, run, or test this version of WordPress on production or mission-critical websites. Instead, it’s recommended to evaluate RC3 on a test server and site. Wait, what happened to […]

Posted on 24 November 2026

Join the WordPress 7.2 Release Celebration Livestream

On December 8, 2026, at 16:00 UTC, contributors to WordPress 7.2 will livestream the release, and you’re invited. Expect demos of what’s new and time to hear from the contributors themselves. Anyone can watch and ask questions. WordPress 7.2 will introduce Ipsum, a new default theme, and a new way to discover posts with /random […]

Posted on 23 November 2026

Global Partners Across the Third Quarter of the 2026

From July through September 2026, the WordPress Community organized 39 events with the financial support of the project’s five Global Partners: Jetpack, WordPress.com, WooCommerce, Bluehost, and Hostinger. From a small gathering of 56 in Mannheim to a Contributor Day in the Philippines that drew 322 people, and the first-ever WordCamp in Eket, Nigeria, these events […]

Posted on 20 November 2026

WordPress Credits Boost Translation

Contributors to the Costa Rican Spanish locale are making WordPress more accessible to Spanish-speaking communities in Costa Rica. Students from local schools and universities have joined the Polyglots team, helping translate WordPress.org projects and review community contributions. Students from two universities and a bilingual high school in Costa Rica contributed through the WordPress Credits [...]

Posted on 20 November 2026