UK Web Focus

Innovation and best practices for the Web

Reusing Individual or Groups of WordPress Posts

Posted by Brian Kelly (UK Web Focus) on 14 April 2010

Is it possible to take an individual post from this blog and reuse it another environment? You can take the most recent blog posts (which I’ve currently configured to be the 26 most recent posts) and reuse them in another environment using the blogs RSS feed.  The most recent posts can be viewed in a personal RSS reader, displayed in a public RSS viewer such as Netvibes, fed into a service such as Wordle to create a word cloud, etc. But what if you want to do something with a post which I created a while ago, such as the An Opportunities and Risks Framework For Standards post which was published in January 2010?. Can that post be reused in ways other than just linking to the page?

The answer to this question was provided by Tony Hirst in a post on Single Item RSS Feeds on WordPress blogs: RSS For the Content of This Page which he wrote in July 2009. Unlike many of Tony’s development activities which Tony describes on his OUseful WordPress blog, his solution does not involve writing code; rather it is based on a standard, but seemingly not widely-known feature of WordPress blogs – the ability to create an RSS feed for any page which is displayed.

If you have a WordPress blog you can simple add the following few lines of HTML in the sidebar for your blog:

<h2>Syndicate This Page</h2>
<p><a href=”?feed=rss2&amp;withoutcomments=1″>RSS Feed for this page</a></p>

The end user viewing one of your blog posts will be able to click on the link “RSS Feed for this page” and get an RSS view of the post. This RSS file can be used with a variety of RSS tools – what you have provided is a simple mechanisms for reusing A HTML resource (the Web view of the blog post) into a much more reusable format.

Tony pointed out that this trick can be used not only for an individual blog post – in can also be used for  various views for a blog post.  If you look at my posts for January 2008 or for the category Standards, for example, you will see the “RSS Feed for this page” link, and if you click on the link you’ll can an RSS feed of posts published in January 2008 or posts with the category Standards. One caveat I should mention, though, is that the total number of items in the RSS feed is limited to the number specified in the blog’s configuration file.  As mentioned above, the limit for my blog is 26 items. As I published 31 posts in July 2007, not all posts will be included in the RSS feed for the month.  Similarly the RSS feeds for the year and for popular categories will not necessarily contain the complete set of relevant posts (unless I set the number of RSS items to a very large number, which could result in causing problems elsewhere, such as users of RSS reader who might understandably expect to see only the most recent posts).

Recently Paul Milne left a comment on this blog wondering why the “RSS Feed for this Page” link was provided, as it appeared to replicate the functionality of the blog entries RSS link.  I have to admit that the purpose of the link is not obvious. I hope this post provides an explanation of the benefits which this contextual RSS feed can provide.  And I’d encourage other WordPress bloggers to make use of this little-known feature provided on the WordPress blogging platform.

About these ads

2 Responses to “Reusing Individual or Groups of WordPress Posts”

  1. Hi Brian

    I’ve opined many times that RSS/Atom feeds are the backbone of ‘Web 2.0′ and, as you know, our ArchivePress project is based exactly on the notion of Using The Feeds to harvest blog content – posts and comments – from blogs of all flavours, since feeds are the data format common to all (as I described long ago on the JISC-PoWR blog).

    But in effect the ArchivePress plugin is using what’s returned by calling

    ?feed=rss2&withoutcomments=0

    – i.e. the post and its comments in a RSS or Atom wrapper. Unfortunately, as we’ve discovered, the other major blog platforms, like Typepad and Blogger, aren’t nearly as rich or reliable in their use of RSS across the board, but our PHP wizard Emanuele Fortunati has a few tricks up his sleeve.

    As it happens, I noticed this post while looking through one of my demo instances of ArchivePress, so I suppose the answer to your question is yes – QED! BTW, we’re just finishing off what we think is a releasable version of ArchivePress (and we’re grateful for some of your helpful feedback). Anyone who wants can check it out (in all senses) on Google Code.

  2. [...] Reusing Individual or Groups of WordPress Posts [...]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: