Merhaba arkadaslar wp bir sitemde
<img src="<?php
// this is where the Lead Story image gets printed
$values = get_post_custom_values("image1"); echo $values[0]; ?>" alt="image" id="leadpic" width="272" height="204"/>[/QUOTE]
şekildeki gibi kullandığım özel alan resmini image1 alanına herhangi bir resim girmediğimde haberin resimsiz olarak yayınlanmasını istiyorum yani;
Habere resim eklenmemişse, haberin resimsiz yayınlamasını istiyorum bunu nasıl yapabiliriz
Yardımlarnızı bekliyorum
PHPcilere ufak bir soru?
2
●351
- 13-01-2011, 13:12:13
- 13-01-2011, 14:04:48Üyeliği durduruldu
<?php $values = get_post_custom_values("image1"); if($values[0]!=""){ ?> <img src="<?php echo $values[0] ?>" alt="image" id="leadpic" width="272" height="204"/> <?php } ?>o konu bu şekilde değiştirirsen çalışacaktır.