Herself's Webtools

Scripts, HowTos, Templates, Plugins, Widgets, Tips and Useful Information

Archive for the ‘wordpress template’ Category

How to get browsable image galleries in your current Wordpress theme

without comments

I’ve been using this theme on my websites long enough that it’s been tweaked and gotten crufty and it’d be a major pain to change it.

But I really like the new image gallery browsing in WordPress 2.5.1.

Turns out all you need to do is to add one file ‘images.php’ to your theme. You can download image.php.txt and just drop the .txt off it. Upload it to the directory of your current theme. It should work on all themes.

Here are some themes I’ve created image gallery files for:
image.php for Devart’s theme
image.php for New Balance of Blue
Manhattan theme
Sliding Door theme
Wasteland theme
Download the file for your theme, rename it image.php and upload it to your theme directory.

Example: BirdsTX

In your posts you can change the number of columns displayed in your gallery. The tag displays the default of 3. You can use to get 4 columns or choose what ever number of columns you’d like.

Or just cut and paste the text below into a file named images.php in your current theme gallery.

<?php get_header(); ?>
<div id="content" class="widecolumn">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

<div class=”post” id=”post-<?php the_ID(); ?>”>
<h2><a href=”<?php echo get_permalink($post->post_parent); ?>” rev=”attachment”><?php echo get_the_title($post->post_parent); ?></a> » <?php the_title(); ?></h2>
<div class=”entry”>
<p class=”attachment”><a href=”<?php echo wp_get_attachment_url($post->ID); ?>”><?php echo wp_get_attachment_image( $post->ID, ‘medium’ ); ?></a></p>
<div class=”caption”><?php if ( !empty($post->post_excerpt) ) the_excerpt(); // this is the “caption” ?></div>

<?php the_content(‘<p class=”serif”>Read the rest of this entry »</p>’); ?>

<div class=”navigation”>
<table><tr>
<td><?php previous_image_link() ?></td>
<td><?php next_image_link() ?></td>
</tr></table>
</div>
<br class=”clear” />

</div>
</div>
<?php comments_template(); ?>
<?php endwhile; else: ?>
<p>Sorry, no attachments matched your criteria.</p>
<?php endif; ?>
</div>

<?php get_footer(); ?>

Written by timestocome

July 1st, 2008 at 3:08 pm

Posted in wordpress template

Should you use excerpts or full posts on your front page?

without comments

There has been much debate recently among bloggers who blog about blogging about whether to use full or partial posts on your front page. As you may have noticed many bloggers are putting the blog on page two and using more a portal type front page to the website. This allows you to show your visitors more posts. The hope is that you get more page views. Good posts that are old can resurface to the front of your website. It also makes it easier for visitors to find things of interest.

In your Wordpress blog it is very easy to switch between partial and full posts. Edit your Main Index Template and just change the line from one to the other.

For full posts use:

<?php the_content(‘Read the rest of this entry . . .’); ?>

For excerpt use:

<?php the_excerpt(); ?>

The Debate:
Full posts vs partial posts, on the homepage
Full posts or excerpts?
Increase your Alexa rank with post excerpts
Post excerpts on the homepage?
Read more links or full posts?

Cool Themes of this sort:
Jello wala mello
Revolution Magazine
Digs’em WordPress Theme

Here is a very simple demonstration using the Wordpress Classic Theme, you should be able to look at the changes I made to the style.css and index.php page and alter your own favorite theme to this format.

Download Magazine Style Classic WP Theme

Written by timestocome

February 28th, 2008 at 5:00 am

Total barebones three column Wordpress template

without comments

This is a total bare bones Wordpress template. You have one sidebar on the left, a sidebar on the right and your center column for your posts. The header and the footer have no images or styling either. No css styling has been done. Because sometimes you just want to do it all from scratch. This is as close to scratch as I can make the Wordpress 3 column template. Hack away.

Bare Bones Template

Written by timestocome

November 9th, 2007 at 5:00 am