Automatic Wordpress Thumbnail Without Custom Field

thumbnail-preview

Let’s say you want to show thumbnails in your blog’s front page. A lot of blogs do that now and it’s a good way of making the page look more alive.

The only problem though is that using custom fields can be complicated and time-wasting. This post will show you how to make your theme generate thumbnails automatically, based on your post’s first image.

This trick is done by mixing some wordpress hacks and a php script. The PHP script is Darren Hoyt’s timthumb.php, the hack is WpRecipe’s how to get the first post image.

Click to Read

Styling Different Posts in Different Ways With Post_Class

With WordPress 2.7 came the post_class function. This gives a set of CSS classes to a post, depending on what’s in the post (e.g. based on what category it is in).
The code that you use in your template to use this is simply like this:

1
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

While this is a fantastic [...]

Click to Read