Thumb Default | Kod

1076 gün önce Beyazıt tarafından yazılmıştır.
anasayfa
anasayfa
anasayfa

Thumb değişkenini girmediğiniz takdirde yerine önceden tanımladığınız default resim…

Kod:

<?php $resim = get_post_meta($post->ID,'thumb', true);

if($resim != "") {  ?>

<a href="<?php the_permalink() ?>">

<img class="alignleft" src="<? echo strtolower($resim); ?>"/></a>

<?php }else{ ?>

<a href="<?php the_permalink() ?>"><img class="alignleft" src="http://www.anarschi.com/resimyoksa.png" alt="" /></a>

<?php } ?>

thumb değişkenini kendi temanıza göre ayarlayın

Konuyla ilgili yorumlar

“Thumb Default | Kod” için 1 cevap

  1. [...] Burda verdiğim kodları kullanalım. <?php $resim = get_post_meta($post->ID,’programresmi‘, true); if($resim != “”) {  ?> <a href=”<?php the_permalink() ?>”> <img class=”alignright” src=”<? echo strtolower($resim); ?>”/></a> <?php }else{ ?> <a href=”<?php the_permalink() ?>”><img class=”alignright” src=”http://www.anarschi.com/resimyoksa.png” alt=”" /></a> <?php } ?> [...]

Bir Cevap Yazın

anarschi.com © 2007-2011 | anarşik çocuk

Site içerisindeki içerikler izinsiz kopyalanamaz, alıntı yapılamaz.

Powered-Designed and Fucked By Beyazıt K. :)

PS-CSS-WP-WODKA = Gene Gri V2 Teması