• 08-03-2010, 15:09:37
    #1
    Kimlik doğrulama veya yönetimden onay bekliyor.
    Öncelikle merhaba arkadaşlar benim sorum elimdeki özel alan vasıtasıyla resim gösterme kodu hakkında. Fakat ben bu kodda bir değişiklik yapıp herhangi bir resim bulunamadığında varsayılan resim göstermek istiyorum bunu nasıl yapabilirim acaba?
    Şimdiden teşekkürler.
    <?php $screen = get_post_meta($post->ID,'screen', true); ?>
    <img src="<?php echo ($screen); ?>" width="80" height="55" alt=""  />
  • 08-03-2010, 15:23:15
    #2
    <a href="<?php the_permalink() ?>" rel="bookmark"><img style="float:left;margin:0px 10px 0px 0px;"  src="<?php bloginfo('template_url'); ?>/images/thumbnail.png" alt="<?php the_title(); ?>" /></a>
  • 08-03-2010, 18:00:33
    #3
    Üyeliği durduruldu
    <?php if( get_post_meta($post->ID, "screen", true) ) { ?>
    <img src="<?php echo get_post_meta($post->ID, "screen", true); ?>" alt="<?php the_title(); ?>" title="<?php the_title(); width="80" height="55" ?>" />
    <?php } else { ?>
    <img src="VARSAYILAN RESIM ADRESI" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" width="80" height="55" />
    <?php } ?>
    VARSAYILAN RESIM ADRESI yazan yeri özel alan olmaması halinde çıkacak resim adresi ile değiştir
  • 08-03-2010, 23:46:11
    #4
    Alıntı
    <div class="thumb"><a href="<?php the_permalink(); ?>"><?php dp_attachment_image($post->ID, 'thumbnail', 'alt="' . $post->post_title . '"'); ?></a></div>
    <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    <p><?php echo dp_clean($post->post_content, 300); ?><br><b><a href="<?php the_permalink() ?>" title="tıkla devam
    edelim.">Devamını oku...</a></b></p>
    Yukardaki kod için varsayılan resim olayını nasıl yapabiliriz?