Okay, in Just Feed Me One Piece at a Time here’s a quick fix for how to get a single item RSS feed for each separate blog post on a WordPress blog…
…but first, the hint condition for those of you who want to work it out yourself: Features: RSS (WordPress.com).
Can you see what it is yet?
Here: If you go to your main site feed, and then add ?s=oogabooga to the end of the URL, it’ll show you a feed of just the posts that contain the word “oogabooga” in them. (This is called a search feed.)
So a “nearly there” solution is…
…go to the main site feed and use the title of the post you want the feed for as the search term.
Like this:
https://ouseful.wordpress.com/feed/?s=”Just%20Feed%20Me%20One%20Piece%20at%20a%20Time”
Now this works fine if you never mention the exact title of the post in another post on the blog, because post titles are likely to be unique phrases (and so the search will only turn up one result)…
But if you do refer to one post using it exact title in another post, you’ll get multiple hits.
So a quick fix workaround is just to push the feed through a pipe that filters the results list by title:
(An alternative approach would be to use the heuristic that the first mention of the phrase will be in the original post (i.e. the post where the search phrase matches the post title), in which case you could just filter the search feed to return the oldest hit; in a pipe, the easiest way to do this would be to reverse the feed order, (or sort by ascending date) then truncate the feed after 1 item).)
Note that the workaround relies on the WordPress search doing its thing properly and the user getting the search term right…
For a useful workflow, it’d be handy to have a bookmarklet that would generate the URL for a single item RSS feed for a given WordPress blog feed (a bit like the OpenLearn single item RSS feed bookmarklet does for OpenLearn unit pages). This means capturing the blog top-level URL (e.g. https://ouseful.wordpress.com) and the post title. The following pipe attempts to do that just given the URL of the actual post you want the single feed item for (WordPress single item RSS from URl):
This pipe works for OUseful.info, but probably won’t work for a lot of other WordPress blogs because it uses a heuristic to capture the post title from the page title. More specifically, in the OUseful.info case, page titles have the form This is the Post Title « OUseful.Info, the blog…, so the pipe looks for the « then loses it and everything to the right of it in the page title to determine the post title.
What would be handy here would be for all WordPress templates to add a “title” metadata element to the header containing the exact post title..?
Though of course, it’d be nicer still if WordPress and the other blogging platforms made the single item RSS feed available for each post natively, just anyway… ;-)
PS it seems like WordPress does do such a thing…
So the general case solution to single item RSS feeds for WordPress blog posts is use the following construction:
http://wp.example.com/post-URL/?feed=rss2&withoutcomments=1
Here’s a bookmarklet that I think should work on any WordPress blog…
javascript:window.location+=”?feed=rss2&withoutcomments=1″;
(Crappy WordPress won’t let me actually provide a link to the bookmarklet – it insists on stripping out the “javascript:”:-(
And so the web just got a little bit more wired for me… Thanks, Shanta Rohse:-)
(Note that if the blog publisher has configured the feeds to only include summaries rather than full posts, you’ll only get the summary… Unless there’s a URI argument that will force the full item to be published (which I doubt!)?)
PPS it strikes me that you can add a link to the single item RSS feed for a WordPress post by adding something like this to the post (or sidebar, maybe, if your template has sidebar widgets alongside individual posts):
<a href=”?feed=rss2&withoutcomments=1″>Single item RSS feed for this post</a>
Like this: Single item RSS feed for this post
(I’m not sure whether that link will work from within a feed reader, though?)
You are most welcome, Tony Hirst. I like it when the web gets a little more wired. By the way, I discovered the single post feed construct not from the Codex, but by using the Feedstats plugin by one of my favourite WP plugin developers, Frank Bueltge. This plugin also happens to provide the feed URL to which people subscribe. And people seem to subscribe to all kinds of things outside of the standard blog feed. Go figure.
It’s an amazing stroke of luck that you posted this the very day I was searching for information on how to do this. You saved me a ton of time. Thank you very much!
I’m hoping you can help me. I’ve searched the internet and your post is the only one I can find that relates to what I am looking for. I am a member of a site that lets me upload my blog feeds vs rss. My last 10 blog posts uploaded successfully. I am trying to find a way to link select older posts. I followed your instructions a feed link you suggested and the link worked but did not import the select feed but the ones that were already linked.
http://myblog.com/feed/?s=“my-blog-post-link” and various combinations and it still just imported the prior posts.
I tried this way as well and it didn’t work either
http://myblog.com/2009/11/17/sew-christmas-apron-free-easy-pattern/feed/
I looked at the plugin listed in the first comment and since it was not in English, I wasn’t sure about using it.
Thanks,
The tricks mentioned in this post apply to blogs hosted on wordpress.com and other WordPress hosted blogs. Other blogging platforms, such as blogger, aren’t so rich in the feed support they offer.