• 31-03-2013, 19:04:42
    #1
    arkadaşlar wp temamda öne çıkarılmış göresel için aşagıdaki konu kullanıyorum..

    <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php if ( has_post_thumbnail() ) {the_post_thumbnail();} else {}?></a>
    buna sabit resim eklemek istiyorum nasıl yapabilirim ?
    Yani öne çıkarılmış görsele sahip olmuyan konularda sabit resim görünsün ?
  • 31-03-2013, 19:08:37
    #2
    Üyeliği durduruldu
    <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php if ( has_post_thumbnail() ) {the_post_thumbnail();} else {
    echo'<img src="sabit resim adresi" width="100" height="100"/>';
    }?></a>
  • 31-03-2013, 19:18:13
    #3
    CakirTurk adlı üyeden alıntı: mesajı görüntüle
    <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php if ( has_post_thumbnail() ) {the_post_thumbnail();} else {
    echo'<img src="sabit resim adresi" width="100" height="100"/>';
    }?></a>
    teşekkürler hocam.
  • 19-10-2013, 22:54:00
    #4
    Merhaba konuyu hortlatıcam ama faydalı olduğu için hortlatmak zorundayım zira yardıma ihtiyacım var


    <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php if ( has_post_thumbnail() ) {the_post_thumbnail();} else {
    echo'<img src="sabit resim adresi" width="100" height="100"/>';
    }?></a>

    Bu kod tamam ama sabit resim dışındaki eklenen resmi istediğim ölçüde ölçülendirmem gerekiyor.

    Bu kodlar üzerinde öne çıkarılmış görsel nasıl boyutlandırılabilir acaba ?
  • 20-10-2013, 13:41:40
    #5
    <?php if( has_post_thumbnail()) {
    	$res = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?>
    	<a title="<?php the_title() ?>" href="<?php the_permalink(); ?>"><img alt="<?php the_title() ?>" class="kresim" src="<?php echo $res ?>" width="100%" /></a>
    <?php } else { ?>
    <a title="<?php the_title() ?>" href="<?php the_permalink(); ?>"><img alt="<?php the_title() ?>" class="kresim" src="resim_adresi" width="100%" /></a>
    <?php } ?>