Title: Using Gallery with WordPress
Last modified: August 18, 2016

---

# Using Gallery with WordPress

 *  Resolved Anonymous
 * [22 years, 6 months ago](https://wordpress.org/support/topic/using-gallery-with-wordpress/)
 * I know there was a thread on this before, but i’m not looking to put Gallery 
   in WordPress, just have them integrate to some degree. I know it’s possible (
   [http://photomatt.net/photos/log/](http://photomatt.net/photos/log/)), my friend
   and I were trying make a template that would pull up gallery inside WP, but were
   getting some SQL errors.
    SO: Matt (aka allusion), I know you’ve said “Gallery
   the application as it stands now is not something I’d like to integrate with 
   WordPress,” but I would like to. I don’t want to customize the heck out of it,
   I’m just looking for continuity. Would you possibly mind letting me see your 
   index.php source file for the photo log? Thanks for your time, and for making
   a real MT killer!

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

 *  Moderator [Matt Mullenweg](https://wordpress.org/support/users/matt/)
 * (@matt)
 * [22 years, 6 months ago](https://wordpress.org/support/topic/using-gallery-with-wordpress/#post-28016)
 * My photolog isn’t integrated with WP at all, it’s just integrated with my site
   design. Was that you looking for index.phps on my site earlier? The index actually
   really doesn’t do anything except call albums.php, so here is my [albums.php source](http://photomatt.net/photos/log/albums.phps).
 *  Thread Starter Anonymous
 * [22 years, 6 months ago](https://wordpress.org/support/topic/using-gallery-with-wordpress/#post-28023)
 * It was me, thank you so much for letting me look at this. I guess I misspoke 
   when I said integrated, I guess continuity is the real word here. Again, thanks!
 *  [cedar](https://wordpress.org/support/users/cedar/)
 * (@cedar)
 * [22 years, 6 months ago](https://wordpress.org/support/topic/using-gallery-with-wordpress/#post-28092)
 * Matt, that is so cool. A valid (nearly, except for those unfortunate unescaped
   ampersands) Gallery. I’ll be stashing that away on my local testing server for
   the next time I revisit Gallery ( something I seem to do every six months). Thanks
   for sharing it.
    Anonymous, for me the best route towards getting a consistent
   photo gallery set up (I haven’t done it with Gallery and WP, but have with MT
   and PhotoStack, but the principles apply) would be to think of the WP functions
   as extra tags. There is no reason you can’t use your regular WP template and 
   plug your photo gallery scripting into it replacing the WP stuff.
 *  [mriannnnnn](https://wordpress.org/support/users/mriannnnnn/)
 * (@mriannnnnn)
 * [22 years, 6 months ago](https://wordpress.org/support/topic/using-gallery-with-wordpress/#post-28106)
 * This is a advanced way of doing this. you should be familiar with coding to get
   this done. I’ll help if I can but I am assuming that you are familiar with coding
   and PHP (which most of you are but… 😛 )
    I created two include files that essentially
   wrap around the gallery. I edited the template files for the header and footer
   of the different section (found in the html_wrap dir) this works fabulously. 
   I also edited the essential files like album to include the start of the WP wrap.`
   <?php /* Don't remove these lines, they call the b2 function files ! */ $blog
   = 1; require_once('../wordpress/wp-blog-header.php'); //require_once($abspath.'
   wp-links/links.php'); // not on by default: require_once($abspath... This is 
   in a separate wp_header.php file in the gallery dir. It only includes up to the“
   <body>” tag. I got rid of the header stuff that gallery has to make this work.
   Once this was done I was able to add all the WP functions that I use with the
   rest of the site in the gallery too.

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

The topic ‘Using Gallery with WordPress’ is closed to new replies.

## Tags

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

 * 4 replies
 * 4 participants
 * Last reply from: [mriannnnnn](https://wordpress.org/support/users/mriannnnnn/)
 * Last activity: [22 years, 6 months ago](https://wordpress.org/support/topic/using-gallery-with-wordpress/#post-28106)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
