<img src="<?php echo get_post_meta($post->ID, 'Thumbnail',true) ?>" width="650" height="315" >
Yazı Resmine Varsayılan Resim Atamak
7
●839
- 14-07-2013, 15:46:37<img src="<?php $thumbnailresim = get_post_meta($post->ID, 'Thumbnail',true); if ($thumbnailresim ) echo $thumbnailresim; else echo 'http://www.siteadi.com/wp-content/uploads/resimyok.jpg'; ?>" width="650" height="315" >
Şeklinde değiştirip, kullabilirsiniz. Kod içerisindeki resim adresini kendi sitenizde kullanmak istediğini resimyok resminin adresiyle değiştirin. - 28-10-2013, 19:11:00"<?" yerine "<?php" kullanın. ayrıca "echo ($resim)" şeklinde bir kullanım yok php'dezanaatkar adlı üyeden alıntı: mesajı görüntüle

<h1><?php the_title() ?></h1> <?php $resim = get_post_meta($post->ID, 'resim', true); if($resim) : ?> <a href="<?php the_permalink() ?>" title="<?php the_title() ?><img class="alignleft" src="<?php echo $resim ?>" width="615" height="315" alt="<?php the_title() ?>" /></a> <?php else : ?> <a href="<?php the_permalink() ?>" title="<?php the_title() ?><img class="alignleft" src="resim-urlsi-buraya" width="615" height="315" alt="<?php the_title() ?>" /></a> <?php endif; ?>
umarım işini görür. - 28-10-2013, 19:18:09İlk dediğinle alakalı olarak pek bilgim yok, her ikisi de çalışıyor.ruinded adlı üyeden alıntı: mesajı görüntüle
Fakat kod çalışmadı. - 06-11-2013, 22:40:59zanaatkar adlı üyeden alıntı: mesajı görüntüle
<h1><?php the_title(); ?></h1> <?php $resim = get_post_meta($post->ID, 'resim', true); if($resim) : ?> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?><img class="alignleft" src="<?php echo $resim; ?>" width="615" height="315" alt="<?php the_title(); ?>" /></a> <?php else : ?> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?><img class="alignleft" src="resim-urlsi-buraya" width="615" height="315" alt="<?php the_title(); ?>" /></a> <?php endif; ?>
Bi de bunu denesene hocam
