How to insert Gallery in Wordpress
Do you want a Gallery in your Wordpress Blog?

Since last year, I have been searching high and low on how can I actually insert an in-frame gallery in to one of the tabs in my Wordpress. Finally I found out the right and easy way to do it :)

Previously, I used to put the gallery outside of the blog. Now after integrating it, I managed to put it inside the “pages” tab (please note the Gallery tab on top) which I find more meaningful than being kept outside of the blog. Wanna have the same gallery?

Galley Example

Here’s a simple way on how you can put your gallery in your blog.

  1. Before doing some coding, you will need to install Gallery in your server. You can get the Gallery installation here.
  2. Once you’ve installed it, you will need to go to your Wordpress themes folder. You can find the “themes” folder under wp-content via your cpanel.
  3. Now, go to your existing theme folder (the theme that you are currently using) and create a “new file” called “gallery.php”
  4. You will need to insert the code below in the new file aka gallery.php
  5. <?php /*
    Template Name: Gallery
    */ ?>

    <?php get_header(); ?>

    <div class=”content”>
    <p>
    <iframe class=”galleryframe” src=”http://www.yoursite.com/your gallery location/main.php”
    width=”100%” height=”1200″ frameborder=”0″ scrolling=”no”>
    </iframe>
    </p>
    </div><!– Close content –>

    <?php get_footer(); ?>

  6. Or you can get the php file here. If you downloaded this, extract the file to your existing theme folder.
  7. Now, go to your “pages” tab under Manage in the wordpress side admin and create the gallery tab.
  8. Here’s the trick, locate the Page Template tab (which is located on your right hand side) and select the “gallery template”
  9. Finally, Click Save and you are done!

I hope this will help your quest too :)

Recommended Reading:

WordPress For Dummies (For Dummies (Computer/Tech)) The Far Side ® Gallery 2

You may also like...
Comments
4 comments have been left so far »
  1. kay
    January 4, 2008

    wahh berguna ni since i have tons of pictures mau share selalu…thanks ter.

    [Reply]

    Leave a reply
  2. terry
    January 4, 2008

    Hopefully this can help some of you out there

    [Reply]

    Leave a reply
  3. Jijoy
    January 4, 2008

    fuaaa..this is good..it would be helpful later if I want to post pictures in my blog..

    [Reply]

    Leave a reply
  4. Terry
    January 4, 2008

    Jijoy, try inserting it in your blog man :)

    [Reply]

    Leave a reply
Leave a Comment
Add your picture!
Join Gravatar and upload your avatar. C'mon, it's free!