How to Make WordPress Photo Galleries With WebExport
Let's Say you have a standard WordPress PHP WebLog running on your server. It looks a little like mine, but you've got a different template and a few other details.
You are happy with this setup, but you want to share more than just text, and have a ton of pictures in your iPhoto library, and want to get them out, and onto your webpage. There are two ways to do this, by hand, or with some software. Clearly, you don't want to do it by hand.
Enter WebExport 1.0
, specially designed to do just this, on my machine (you can check out my photo galleries at mountainmandan.net). Here's how to do it yourself:
First, download WebExport and the WordPress template, which is designed to work with the default WordPress theme and comes in the same tarball.
It is easy to modify the WebExport templates to work with other themes. Install the theme by double-clicking it, or moving it to ~/Library/Application Support/WebExport (which you may have to create).
Boot up iPhoto and select the photos you want to export. Select "WebExport" from the choices at the top of the window, and you will be greeted by a potentially scary looking window.
Don't panic! Select the wordpress template from the drop-down, and see the "pathToRoot=../../" pop up. This string tells the template how to get to your main wordpress directory from the directory it lives in. You can edit the titles/authors of the images in the "Metadata" tab (you can save it back to iPhoto for easier editing).
Now you're ready to export.
Click "Export" at the bottom of the page, and navigate either to the location you have WordPress installed in (it should have all kinds of wp-stuff.php files in it), you can also export to a temporary directory, and upload it to your website. Create a folder inside the wordpress directory called "galleries", and another one inside that one with a UNIX-ized version of your gallery name (My Favorite Photos -> my_favorite_photos). Select this directory and click "OK". Wait while WebExport does it's thing, and when it's done, open up that page on your webserver (local viewing won't let the PHP work).
Great, now you have a website, but nothing links to it. You can either manually add a link to your sidebar.php theme file, or you can make some PHP code that automatically does that, like in my sidebar.
The final product:

August 30th, 2006 at 4:53 am
would you share the php code to add the Photo Galleries section to the side bar? I'm not a PHP guru.
August 30th, 2006 at 8:45 am
Here is a copy of my sidebar file:
sidebar.phps
August 31st, 2006 at 5:57 am
Thanks!
December 14th, 2006 at 7:21 pm
thx a lot!
February 22nd, 2007 at 10:48 am
Cool! Do you have any suggestions on implementing lightbox functionality into the PHP code for your sidebar?
February 22nd, 2007 at 11:19 am
What is lightbox functionality? Is that where it cycles through a series of images, or picks a random one from a library to stick in the sidebar every time the PHP renders? That would be reasonably easy, just make a separate thumbnail folder for sidebar-sized thumbnails, and have the PHP sidebar tool pick a random one in that folder. Or you could have WebExport create an XML file with links to the files, with metadata that the PHP could also display.
All in all… a great idea! I should work up some mockups. I also should start working on some cooler JavaScript like the ones I've been seeing around. Well, I have this weekend pretty free, I may just get around to that.
February 22nd, 2007 at 1:10 pm
Lightbox is a cool javascript (I believe) that opens an image in the same window as the thumbnail but places an translucent layer between the page and the image.
Here is the website for it:
http://www.huddletogether.com/projects/lightbox2/
Here is the Wordpress plug-in:
http://www.4mj.it/lightbox-js-v20-wordpress/
February 22nd, 2007 at 3:24 pm
Ooooh. I see what you're getting at! I'd install the Wordpress plugin, and then modify the code slightly to use the rel="lightbox" bit. That should do it, this weekend I'll probably get around to making a lightbox demo.
September 8th, 2007 at 2:37 pm
This is my first post
just saying HI
January 4th, 2008 at 12:14 am
This plugin rocks! THank you so much!
July 11th, 2008 at 2:30 am
So perfect it was what i was looking for.
Thank you so much.
October 30th, 2008 at 2:10 am
Thank you for sharing this one!
May 14th, 2009 at 9:04 am
Seriously, I have no idea how to do this. I'm not a beginner, but the installation instructions do not seem clear with the separate templates and where exactly to upload to. Please help. This is how my site looks after I have finished what I thought I was suppose to do:
http://www.lannalife.org/new/galleries/dts/
HELP!