Wordpress-Gallery Integration
Thursday, July 26th, 2007At long last, I have Wordpress and Gallery integrated, with the help of some plugins and tweaking. If you click on Photos on the right, you should get the Gallery main page embedded in Wordpress. W00t!
(This has undergone minimal testing, so if it doesn’t work for you, drop me a comment or an email.)
Here’s a quick walk-through for anyone trying to do this (and, let’s face it, so I don’t forget how it works):
The WPG2 plugin embeds Gallery in Wordpress.
The Page Links To plugin lets me direct the “Photos” link right to my embedded Gallery instead of a Wordpress page.
1. In Gallery Site Admin, turn off the URL Rewrite module. I was using URL Rewrite to get pretty links, but it confuses WPG2. Unfortunately this means I’ll have to go back through blog postings and fix the links, but I would have had to do that anyway because I want them to link to embedded albums now.
2. Download WPG2. Unzip it, and drop the directory in <wordpress_root>/wp-content/plugins. Move wp-gallery2.php to <wordpress_root>.
3. In the Wordpress admin page, go to plugins, and activate WPG2. WPG2 should show up on the top menu bar.
4. Go to the WPG2 menu in the Wordpress admin page, and go through the auto config. You may have to temporarily make your .htaccess writable so it can modify it. Then you can run through the rest of the sub menu, but if you just want an embedded Gallery (no sidebar blocks or shared users), you can ignore it all.
5. Now you should be able to load <wordpress_root>/wp-gallery2.php in your browser.
6. Upload and activate the Page Links To plugin in the same way.
7. Create a new Page in Wordpress and save it. Then go back to Manage -> Pages and edit it again. Add a custom field “links_to” with the value being the full URL to wp-gallery2.php. For me this step didn’t work when I added the custom field as I created the page.
8. Then hack up the Gallery template a bit so it fits better; you can find steps for that elsewhere.
Voila!
