This is my first attempt at a WordPress plugin. I implemented it on The News Tribune‘s homepage several months ago and there haven’t been any disasters, so I’m considering it a success.
This plugin takes post data from your WordPress blog and creates an XML feed of that data. I suppose it could have several uses, but it is optimized to feed data to Flash photo galleries with info from the Title and Excerpt fields as well as each post’s permalink.
Download the plugin: Photo Gallery XML Export v1.0.0
I’ve also added the ability to include up to five custom fields (good for thumbnails) and the option of limiting to just one category.
Here’s a screenshot of the options page:

How you might use this in the real world:
If you have a photo blog or a blog that usually includes at least one photo per post, you could use exported XML data from your blog to feed a Flash content rotator that you would use to promote that blog on another page of your site.
Or, if you have a special feature on your blog — say, “Recipe of the Week” — that includes a photo, you could assign that special feature a category (like “recipeoftheweek”) and use exported XML data from just that category to feed a Flash content rotator to promote that special content.
Here’s an example of my blog’s content as XML generated from this plugin:

And here’s a live example of a Flash content rotator that’s pulling data from XML generated by this plugin:
A few suggestions for Flash content rotators:
• Flash Image Rotator using XML Playlist
Some notes:
1) The XML declaration is hard-coded to be: <?xml version=”1.0″ encoding=”UTF-8″ ?> … I don’t have any plans to change that unless I get requests for other declarations.
2) You can name most XML elements however you see fit, but right now the parent element is hard-coded to “images” and each blog post parent element is hard-coded to “pic.” I’m hoping to make that customizable in the future.
3) If your excerpt isn’t populated, it will pull from your blog post. Not entirely ideal, but that’s how WordPress excerpts work by default.



Sunday, December 6th, 2009, 5:06 pm | 



December 6, 2009 at 6:56 pm
This is easily the geekiest thing I have ever read. And that’s coming from a neuroscientist.
December 6, 2009 at 7:02 pm
Ha! Oh puh-leaze. Your neuroscience-y posts fly right over my giant geek head.
January 31, 2010 at 10:42 am
This looks promising!, i’ve been looking for something like this for flash galleries. Will try it.
February 24, 2010 at 1:02 pm
Is this working with the current version of WP?
All i get is to empty pic-tags…
February 24, 2010 at 1:16 pm
It works for me and haven’t heard problems from others. Send me a link to your RSS and a screenshot of your options page and I’ll see if I can figure out the issue: lgentry@gmail.com
April 8, 2010 at 3:08 am
I have the same problem
Would love to get this plugin working as the complete export is massive and slow to import into flash with xpath.
I get a load of empty pic tags.
Is there some configuring I need to do?
April 8, 2010 at 4:22 am
actually, update to that.
through the settings I’ve got the xml to return the title, excerpt text and the page link.
But I can’t get it to return an image path, as the only place I can add an image is in the main content area, but the lugin doesn’t seem to return xml for that part.
please help!
thanks
May 10, 2010 at 12:34 am
That plugin is just amazing!!! It takes WordPress to a whole new level of Design possibilities if used with caution. I have researched all over Google for a WordPress XML post exporter as a way of integrating WordPress and Flash without much “comprehensive material” success and this is it – so simple and easily customizable.
By the way, I don’t like to sound pretentious but I honestly think you should consider changing the name of the plugin to “XML Export” alone, without the “Photo Gallery”. I know a lot of people are going to use it for photo galleries and slideshows (me included), but having it in the name somehow limits researchers aiming for the whole WordPress+XML+Flash integration possibility. Just an idea.
Thank you very much!
May 10, 2010 at 6:49 am
Thanks for your kind words, Eduardo. I’m glad you’ve found it so useful.
I have been considering changing the name of the plugin, but have been hesitant because of the volumes of people looking for ways to get data for their photo galleries (want to make sure their searches turn up this plugin). But I’m certainly still considering it.
I’ve started creating plugins that make post-specific XML files for specific Flash galleries as well. My first attempt is for Simpleviewer: http://www.lauragentry.com/wordpress/?p=343 I think it’s a more elegant plugin than this one and has given me some ideas on how to improve upon this one as well.
June 29, 2010 at 8:06 pm
Hi,
I’m trying to install your plugin and have followed all the instructions (I think correctly) but am not able to get to work. I am new to the wordpress, so may not know what I’m doing. In need of your help please. Thanks.
June 29, 2010 at 8:32 pm
Hi James, I’d be happy to help. Feel free to email me a screenshot of your options page so I can try and troubleshoot the issue. Also let me know what version of WordPress you have installed and include a link to your WordPress site. Email me at its.the.general@gmail.com
July 26, 2010 at 12:54 am
Laura, Eduardo Malheiros here again.
Laura, is there any way to export more than one category to the XML or to create more php-to-xml links, one for each category? The possibility to use at least two categories would be really helpful. Anyway, your plugin still rocks!
Thank you very much again!
July 30, 2010 at 9:24 am
Hey Eduardo, sorry for the slow response. I’ve been super busy so haven’t been able to devote much time to plugin development lately. In the future, I may try and create a similar plugin that uses .xml extensions and allows category-specific XML. My Simpleviewer plugin uses xml extensions but only currently allows post-specific XML.
As for the extra category addition, I just looked into if this is possible and it doesn’t seem so given the way the plugin was written. I use a URL string using the “category_name” tag to generate the RSS that I then turn into XML. Unfortunately, WordPress doesn’t seem to support multiple category_names in a URL string. I tried changing it to category IDs and still no go.
Hopefully I’ll be able to getting around to developing a category-specific plugin that creates an XML file for each category. If I make progress on this, I’ll certainly let you know, but it likely wouldn’t happen until late fall or winter.
Trackbacks
April 21, 2010 at 4:50 pm