Herself’s Webtools

Webtools for Webmasters: Scripts, HowTos, Templates, Plugins, Widgets, Tips and Useful Information

Herself’s Webtools header image 1

Entries Tagged as 'wordpress template'

How to get browsable image galleries in your current Wordpress theme

July 1st, 2008 · No 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.

Example: BirdsTX

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(); ?>

Tags: wordpress template

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

February 28th, 2008 · No 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

Tags: hack your template · wordpress · wordpress template

Total barebones three column Wordpress template

November 9th, 2007 · No 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

Tags: hack your template · wordpress template

Three column simple blue Wordpress template

October 19th, 2007 · No Comments

Here is a very simple, very clean three column Wordpress template. I tried to keep the style.css sheet very simple so it will be easy for you to adapt and change.

Tags: wordpress template