zanaatkar adlı üyeden alıntı: mesajı görüntüle
Yeniden başıma böyle bir durum geldi, beceremedim.
<h1><?php the_title();?></h1>
<?php $resim = get_post_meta($post->ID,'resim', true); if($resim != "") { ?>
<img class="alignleft" src="<? echo ($resim); ?>" width="615" height="315" alt="<?php the_title(); ?>" /></a>
<?php }else{ ?>
<?php } ?>
Şu kodlara varsayılanı resmi nasıl yerleştirebiliriz?
"<?" yerine "<?php" kullanın. ayrıca "echo ($resim)" şeklinde bir kullanım yok php'de

<h1><?php the_title() ?></h1>
<?php $resim = get_post_meta($post->ID, 'resim', true);
 if($resim) : ?>
<a href="<?php the_permalink() ?>" title="<?php the_title() ?><img class="alignleft" src="<?php echo $resim ?>" width="615" height="315" alt="<?php the_title() ?>" /></a>
<?php else : ?>
<a href="<?php the_permalink() ?>" title="<?php the_title() ?><img class="alignleft" src="resim-urlsi-buraya" width="615" height="315" alt="<?php the_title() ?>" /></a>
<?php endif; ?>
umarım işini görür.