Merhaba arkadaşlar bir sorum olucak öne çıkan görseli normalde sayfa içinde gösterebiliyorum fakat src içine aynı kodu yazınca olmuyor örneğin aşağıdaki src içine öne çıkan resmi eklemek istiyorum nasıl yapmalıyım ?
<img src="one-cikan-resim" width="150" height="100" itemprop="photo"/>
Öne Çıkan Görsel
4
●279
- 20-06-2014, 20:44:10Sanırım istediğin kod bu;
aşağıda ki kodu aynen kullanabilirsin.İlk kod öne çıkarılmış varsa gösterir ikinci olan da eğer öne çıkarılmış görsel belirlenmemişse resim yok gibi bir resim gösterir.
<?php $image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full'); if ( has_post_thumbnail() ) { ?> <a title="<?php the_title(); ?>" href="<?php the_permalink() ?>" ><img src="<?php echo $image_url[0]; ?>" alt="<?php the_title(); ?>" width="274px" height="106px" /></a> <?php } else { ?> <a title="<?php the_title(); ?>" href="<?php the_permalink() ?>" ><img src="<?php bloginfo('template_url'); ?>/images/default.png" alt="<?php the_title(); ?>" width="274px" height="106px" /></a> <?php } ?>
--R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 20:44:10 -->-> Daha önceki mesaj 20:42:52 --
Başka sorun olursa elimden geldiğince bilgim dahilin de cevaplayabilirim.
