Title: Gallery include
Last modified: August 18, 2016

---

# Gallery include

 *  [wonder](https://wordpress.org/support/users/wonder/)
 * (@wonder)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/gallery-include/)
 * I have gallery script that I made before and I would love to still use it but
   I cant figure out how I can include it together with wp layout like this something
   like this **include(‘gallery.php’);** or include the layout (header, footer, 
   sidebar) with the script. I have tryed to include the header but it wount work,
   it gives me error only like this
 * Warning: main(blog/wp-content/themes/header.php): failed to open stream: No such
   file or directory in /home/mystif/public_html/portfolio/gallery.php on line 33
   
   Warning: main(blog/wp-content/themes/header.php): failed to open stream: No such
   file or directory in /home/mystif/public_html/portfolio/gallery.php on line 33
   Warning: main(): Failed opening ‘blog/wp-content/themes/header.php’ for inclusion(
   include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/mystif/public_html/
   portfolio/gallery.php on line 33
 * Some ideas?

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

 *  [mschorn](https://wordpress.org/support/users/mschorn/)
 * (@mschorn)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/gallery-include/#post-212181)
 * i’m assuming you want this in wrapped in your theme…
    have you tried making a
   blank template page then using full path to your gallery.php eg: `<?php require("
   http://xxx/gallery.php"); ?>`
 * then call header, footer and sidebar as needed
    if you haven’t checked out wp-
   gallery2 plugin you might want to have a look. it works great but you’ll need
   to get the latest gallery2 beta [http://wpg2.ozgreg.com](http://wpg2.ozgreg.com)
   for plugin
 *  Thread Starter [wonder](https://wordpress.org/support/users/wonder/)
 * (@wonder)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/gallery-include/#post-212439)
 * Ohh thanks for your help, it works fine, only problem is that my dynamic links
   for next and previous wont work with the theme, next page comes up but whitout
   the theme 🙁
    Any ideas
 *  Thread Starter [wonder](https://wordpress.org/support/users/wonder/)
 * (@wonder)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/gallery-include/#post-212440)
 * I figured it. Thanks for your help!

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

The topic ‘Gallery include’ 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/)
 * 3 replies
 * 2 participants
 * Last reply from: [wonder](https://wordpress.org/support/users/wonder/)
 * Last activity: [20 years, 10 months ago](https://wordpress.org/support/topic/gallery-include/#post-212440)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
