Title: Where is the gallery code?
Last modified: August 19, 2016

---

# Where is the gallery code?

 *  [albinoazn](https://wordpress.org/support/users/albinoazn/)
 * (@albinoazn)
 * [18 years ago](https://wordpress.org/support/topic/where-is-the-gallery-code/)
 * I am wondering where the code is for the template of a gallery? I want to go 
   in and add some snippets to it, but I can’t seem to find it?
 * I am referring to the built in gallery for the newest version of wordpress.
 * Thank you,
    -Jake Moore

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [Ryan Hellyer](https://wordpress.org/support/users/ryanhellyer/)
 * (@ryanhellyer)
 * [18 years ago](https://wordpress.org/support/topic/where-is-the-gallery-code/#post-762213)
 * 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.
 *  [ivovic](https://wordpress.org/support/users/ivovic/)
 * (@ivovic)
 * [18 years ago](https://wordpress.org/support/topic/where-is-the-gallery-code/#post-762214)
 * 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.
 *  [Ryan Hellyer](https://wordpress.org/support/users/ryanhellyer/)
 * (@ryanhellyer)
 * [18 years ago](https://wordpress.org/support/topic/where-is-the-gallery-code/#post-762216)
 * 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.
 *  [Ryan Hellyer](https://wordpress.org/support/users/ryanhellyer/)
 * (@ryanhellyer)
 * [18 years ago](https://wordpress.org/support/topic/where-is-the-gallery-code/#post-762217)
 * There’s a plugin on this page which does the trick quite nicely 🙂
 * [http://alastairc.ac/2008/04/galleries-in-wordpress-25/](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.
 *  [Ryan Hellyer](https://wordpress.org/support/users/ryanhellyer/)
 * (@ryanhellyer)
 * [18 years ago](https://wordpress.org/support/topic/where-is-the-gallery-code/#post-762218)
 * 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.
 *  [Ryan Hellyer](https://wordpress.org/support/users/ryanhellyer/)
 * (@ryanhellyer)
 * [18 years ago](https://wordpress.org/support/topic/where-is-the-gallery-code/#post-762263)
 * 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](http://justintadlock.com/archives/2008/04/13/cleaner-wordpress-gallery-plugin#comment-4914)

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Where is the gallery code?’ is closed to new replies.

## Tags

 * [gallery](https://wordpress.org/support/topic-tag/gallery/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 3 participants
 * Last reply from: [Ryan Hellyer](https://wordpress.org/support/users/ryanhellyer/)
 * Last activity: [18 years ago](https://wordpress.org/support/topic/where-is-the-gallery-code/#post-762263)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
