Annoyingly the gallery seems to generate it’s own code seperate from the template files. I have no idea why it does this, but am also looking to figure out a way to change the code as it is quite limiting in it’s current state.
Like most of wordpress’ most useful little toys, it’s really only a demo allowing the devs to insert some plugin hooks.
the idea with this (as with the user meta information) is for people to throw plugins at it, and make it do stuff. That’s why it sucks so much.
The standard code is appalling. The addition of clear:both to create the appearance of rows is driving me nuts. They’ve essentially created a table of images so would have been better off using a table tag IMO. I’m regretting not testing this out during the beta stages. I would have filed a bunch of bug reports in relation to this had I known. Oh well, I’ll know to test out ALL of the new features next time 🙂
Anyhows, do any of you know how to change it now that it’s locked into place? That annoying clear:both is causing serious issues for me in trying to make my themes work with the gallery function, so I need to find a way to get rid of it.
There’s a plugin on this page which does the trick quite nicely 🙂
http://alastairc.ac/2008/04/galleries-in-wordpress-25/
It shouldn’t be too difficult to transfer the plugin code over to a theme too, so users won’t need to bother with uploading a plugin to fix this error in the core.
Apparently the guy who wrote the plugin has submitted bug reports in relation to this so fingers crossed they’re fixed for WP 2.6.
Confirmed. You can just grab the code from the plugin and dump it into a function.php file with your theme. It then gets rid of the awful default code and replaces it with a simple unordered list. It looks like it would be quite easy to modify the HTML to suit your needs too, although I haven’t tried yet.
Sounds like Version 2.6 will be improving this code so we hopefully won’t need to keep adding scripts to fix it … http://justintadlock.com/archives/2008/04/13/cleaner-wordpress-gallery-plugin#comment-4914