WordPress.org

Ready to get started?Download WordPress

Forums

Gallery include (4 posts)

  1. wonder
    Member
    Posted 9 years ago #

    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?

  2. mschorn
    Member
    Posted 9 years ago #

    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 for plugin

  3. wonder
    Member
    Posted 9 years ago #

    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

  4. wonder
    Member
    Posted 9 years ago #

    I figured it. Thanks for your help!

Topic Closed

This topic has been closed to new replies.

About this Topic