Hammered together the next version of the wp-opml.php template over the last day or so. This version shows the post links for the entire blog, within their respective categories. Categories are also properly nested. You can see the results here. The template file is available here. You could also browse the opml at Voidstar’s OPML Browser or at Randy Charles Morin’s OPML Surfer at KBCafe.
This version required a few extra functions – I placed those in a plug-in suitable file(cs_posts-by-category.php) which you can get here. It’s so named because 3 of the 4 functions might be suitable for other kinds of WP blog category/post uses as well.
I’m playing with the idea of serving up the entire contents of the blog in this fashion, but right now I’m thinking better of it; there’s a lot of data there. Perhaps something more like an RSS feed for that purpose, that limits itself to 30 posts or so. In any case, after I test this out on a few other renderers and double-check with the current thinking out there about proper use of OPML attributes, I’ll wrap it up in a more portable fashion.
It occurs to me that since there’s no other documentation yet, a brief description of how to use this is in order.
- Download the template file from http://kinrowan.net/development/WordPress/wp-opml.php.txt, rename it to wp-opml.php, and drop it somewhere in your WordPress directories. I placed mine in my WordPress Home directory, along side the wp-rss2.php template file.
- Download the plugin file from http://kinrowan.net/development/WordPress/cs_posts-by-category.php.txt and rename it to cs_posts-by-category.php. Place it in your plugins directory (%wp-home%/wp-content/plugins).
- go to your plugins admin page (http://%your-wordpress-address%/wp-admin/plugins.php) and activate the plugin.
- browse to the wp-opml.php file. Lo and behold – OPML!
Please contact me with comments or questions.