temandaki functions.php dosyanı aç
// Get URL of first image in a post
function catch_that_image() {
global $post, $posts;
$first_img = '';
ob_start();
ob_end_clean();
$output = preg_match_all('/<img.*?src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
$first_img = $matches [1] [0];
// no image found display default image instead
if(empty($first_img)){
$first_img = "/default.jpg";
}
return $first_img;
}Bu kodu ekle
Resmi gösterdiğin yere
<?php echo catch_that_image() ?>
ekle. Boyutlandırmak istersen
<img src="<?php echo catch_that_image() ?> " alt="" height="270" width="495" /></a>
Be şekilde ekleyebilirsin. Eğer konuda resim yoksa default.jpg yi açar
Bu kodlar ile özel alan eklemeden konudaki ilk resimi çağırıyorsun..
Birde senin sitedeki sorun ise
http://www.haber35.info/wp-content/t...=60&h=100&zc=1
Burada "timthumb.php" de resimlerin senin hostunda olması gerekiyor..
Yukarıda benim verdiğime girdiğinizde verdiği hata şu
Alıntı
/www.haber35.com/resimler/ozden_toker_koskte2.JPG not found.
http://www.haber35.com/resimler/ozden_toker_koskte2.JPG olması gerekiyor halbuki.
temadan timthumb u kaldıracaksın. ya da kendi hostuna alacaksın resimleri.