Technology, wordpress

How to insert Gallery in Wordpress

01.03.08 | 4 Comments



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

some posts that may be related

4 Comments

speak up

Add your comment below, or trackback from your own site.
Subscribe to these comments.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

:

:


« My resolution 2008
» New Year New Theme
Copyright © 2007 The L@bunda Blog. All rights reserved.