<img src=<?php $values = get_post_custom_values('resim'); echo $values[0]; ?> width='150' height='150' alt=<?php the_title(); ?> />
Resim yoksa gözükmesin ?!..
14
●2.747
- 19-05-2010, 13:38:02Üyeliği durdurulduÖzel alana resim eklemediğimde boş kutu olarak çıkıyor bunun çıkmaması için ne yazmam lazım ?!..
- 19-05-2010, 13:50:22Üyeliği durduruldu
<?php $values = get_post_custom_values('resim'); echo $values[0]; if($values[0]){ echo '<img src="'.$values[0].'" width='150' height='150' alt="'.get_the_title().'" />'; /*eğer resim varsa*/ }else{ echo '<img src="resim adresin" title="" alt="" />'; // eğer resim yoksa } ?>temanın uygun yerine yerleştir eğer resim yoksa kendi belirlediğin resim çıkartır varsa özel alandan aldığı resim url sini yazar...
eğer resim yoksa hiç bir şey çıkmamasını istiyorsan
echo '<img src="resim adresin" title="" alt="" />'; // eğer resim yoksa
kısmını sil kalsın - 19-05-2010, 14:04:29Üyeliği durduruldu<img src=<?php $values = get_post_custom_values('resim'); echo $values[0]; ?> width='150' height='150' alt=<?php the_title();
else{
echo 'deneme';
}
?>/>
burda ne sorunu olabilir :S yeni php tagımı açmadım anlamadım gitti
- 19-05-2010, 15:11:51Üyeliği durduruldu
<?php $values = get_post_custom_values('resim'); $resim = urldecode($values[0]); if($resim){ echo '<img src="'.$resim.'" width="150" height="150" alt="'.get_the_title().'" />'; }else{ echo '<img src="resim adresin" title="" alt="" />'; } ?>olarak değiştir...