functions.php dosyasına

Alıntı
<?php
function catch_that_image() {
global $post, $posts;
$first_img = '';
$url = get_bloginfo('url');
ob_start();
ob_end_clean();
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
$first_img = $matches [1] [0];

$not_broken = @fopen("$first_img","r"); // checks if the image exists
if(empty($first_img) || !($not_broken)){ //Defines a default image
unset($first_img);
} else {
$first_img = str_replace($url, '', $first_img);
}
return $first_img;
}
?>
ekleyin.

kod bu şekilde

Alıntı
<marquee scrollamount="7" onMouseover="this.scrollAmount="5" onMouseout="this.scrollAmount="7">

<?php $recent = new WP_Query("cat=4&showposts=10&offset=0"); while($recent->have_posts()) : $recent->the_post();?>

<a href="<?php the_permalink() ?>">
<img src="<?php echo catch_that_image() ?>" width="150" height="200" border="0"></a>

<?php endwhile; ?>

</marquee>