How to make your theme Wordpress 2.5 ready?

When I first tried Wordpress 2.5, I thought I messed up because I couldn’t make the Photo Gallery look like as how I’m seeing it from other bloggers. However, through constant frequenting at several forums, I finally found out that it was the image.php file that I have to tweak to make the inside gallery pages appear as it should. Now that I know what to do, my Wordpress Theme don’t have an image.hp file to start tweaking with.

How to make your theme Wordpress 2.5 ready?

1. Create a copy of your single pages and re-name it image.php.

2. Open the image.php file and look for something similar to

<?php the_content(’Read the rest of this entry…’); ?>
*This is supposed to be the code for the post content

<?php wp_link_pages(array(’before’ => ‘<p><strong>Pages:</strong> ‘, ‘after’ => ‘</p>’, ‘next_or_number’ => ‘number’)); ?>
*While this is supposed to be the Pages Navigation Links

3. Now you will replace both lines of codes with

<?php echo wp_get_attachment_image( $post->ID, ‘large’ ); ?>

<div class=”caption”><?php if ( !empty($post->post_excerpt) ) the_excerpt(); // this is the “caption” ?></div>

<?php previous_image_link() ?><?php next_image_link() ?>
*This is the code for the thumbnail navigation

4. Style them if deemed necessary.

5. Upload your image.php file in your theme folder and experience the magic of Wordpress 2.5 Gallery.

Continue reading » · Rating: · Written on: 05-09-08 · No Comments »