Comment on WordPress SEO by ziv.

WordPress SEO David
You wrote:
>> Adding thumbnails to a WordPress theme isn’t an easy thing to do, every archive template file needs the code and it needs to be built into the theme in otherways.

[[please delete this hereunder if you wish not to show piece of codes to the readers]]
I managed to add a thumbnail to the category page. I am grab the first image from the post and display it side by side the link.

Here’s the code to add to the function.php
<?php
function catch_that_image() {
global $post, $posts;
$first_img = '';
ob_start();
ob_end_clean();
$output = preg_match_all('//i’, $post->post_content, $matches);
$first_img = $matches [1] [0];

if(empty($first_img)){ //Defines a default image
$first_img = “http://www.domain.com/images/default.jpg”;
}
return $first_img;
}

Once done, you can simply call the function within the loop to display the first image from the post.

That is what I’ve added to the category page before the link to the post:

<a href="”><img src="” alt=”” title=”” width=”100″ height=”100″ />

Ziv