@Spider, arkadaş sanırım özel alanlarla uğraşmamak için bu kodu kullanıyor
Şunu denermisiniz acaba?
Temanızın functions.php dosyasına şu kodu ekleyin:
<?php
function resimgoster(){
global $post;
$id = $post->ID;
$the_content =$wpdb->get_var("SELECT post_content FROM $wpdb->posts WHERE ID = $id");
$pattern = '!<img.*?src="(.*?)"!';
preg_match_all($pattern, $the_content, $matches);
$img = $matches['1'][0];
if($img == "") {
$img = "http://siteadi.com/resim.jpg"; #resim yoksa gösterilecek resim
}
$output = "<img src=\"".$img."\" width=\"200px\" height=\"200px\" />";
return $output;
}
?>daha sonra index.php de:
<img src="<?php if($image_src != '') { echo $image_src; } ?>"
alt="<?php the_title(); ?>" class="left" width="200px" height="200px" />satırlarını silin, yerine
<?php echo resimgoster(); ?>
yazın.
denerseniz sevinirim