As I couldn’t find a hack or plugin that did this easily, I whipped up a small PHP script today that builds an RSS (RSS2) feed that contains the latest 10 posts and their comments in one simple feed.
DISCLAIMER: I did some basic tests of this code on a friend’s blog, and it checked out ok…which doesn’t mean it’s 100% guaranteed fault free. Also the code is quite quick ‘n’ dirty, feel free to adapt and use in whatever way you want, but please give credit, my ego needs feeding too 🙂
1. Download the source code here.
2. Save the file with extension ‘.php’ (so change the ‘.txt’ extension), and upload to the root of your WordPress directory.
3. Access the url to the file (i.e.: http://www.yoursite.com/wp-rss2-combined.php) using your favorite RSS reader to test and verify it’s working.
If you wish to change the number of posts shows in this feed, open the file in a text or web editor, and find these lines near the top of the file:
// how many posts to show?
$limit = 10;
Change the number to whatever you want and hey presto!
Do enjoy, comments are welcome.
- The topic ‘Small solution: Combined RSS feed (post comments)’ is closed to new replies.