• 29-01-2014, 15:22:37
    #1
    merhaba arkadaşlar tema yapıyorum temam da öne çıkarılmış kodları çekiyorum tamam güzel ancak yazılarda resim olmayınca başlıklar felan kayıyo.
    Temama eğer öen çıkarılan görsel yok resim yok resmi nasıl eklerim yardımlarınız bekliyorum.
  • 29-01-2014, 15:30:28
    #2
    <?php else : ?><img src="<?php bloginfo('template_url'); ?>/img/resimyok.jpg" alt="<?php the_title(); ?>" />
    Öne çıkarılan resim sorgusu yaparken if döngüsünden sonra else diyerek yukarıdaki kodu uygulayabilirsiniz. Böylece öne çıkarılan resim olmadığında belirtmiş olduğunuz resim gösterilecektir.
  • 29-01-2014, 15:37:56
    #3
    Ruwm adlı üyeden alıntı: mesajı görüntüle
    <?php else : ?><img src="<?php bloginfo('template_url'); ?>/img/resimyok.jpg" alt="<?php the_title(); ?>" />
    Öne çıkarılan resim sorgusu yaparken if döngüsünden sonra else diyerek yukarıdaki kodu uygulayabilirsiniz. Böylece öne çıkarılan resim olmadığında belirtmiş olduğunuz resim gösterilecektir.

    hocam malesef olmadı kodar bu şekilde

    <?php if(has_post_thumbnail()) { the_post_thumbnail(); }
    				
     elseif( $thumbnail = get_post_meta($post->ID, 'resim', true) ){?>
    				<img src="<?php echo $thumbnail;?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" width="250" height="220" /> 
    				<?php }else { ?><img src="<?php bloginfo('template_url'); ?>/images/hgtucelcom.jpg" alt="<?php the_title(); ?>" />
    
    				<?}?>
  • 29-01-2014, 15:43:24
    #4
    PHP - WORDPRESS - YAZILIM
    timthumb varsa

    <?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() ?>" rel="bookmark"><img src="<?php bloginfo('template_url'); ?>/timthumb.php?src=<?php echo get_post_meta($post->ID, "resim", true); ?>&w=250&h=220&zc=1" alt="<?php the_title(); ?>" width="250" height="220" /></a>
    <?php } else { ?>
    <a title="<?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php bloginfo('template_url'); ?>/timthumb.php?src=<?php bloginfo('template_url'); ?>/images/hgtucelcom.jpg&w=250&h=220&zc=1" alt="<?php the_title(); ?>" width="250" height="220" /></a>
    <?php } ?>
    yoksa

    <?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() ?>" rel="bookmark"><img src="<?php echo get_post_meta($post->ID, "resim", true); ?>" alt="<?php the_title(); ?>" width="250" height="220" /></a>
    <?php } else { ?>
    <a title="<?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php bloginfo('template_url'); ?>/timthumb.php?src=<?php bloginfo('template_url'); ?>/images/hgtucelcom.jpg" alt="<?php the_title(); ?>" width="250" height="220" /></a>
    <?php } ?>
    şeklinde deneyin hocam.
  • 29-01-2014, 15:45:58
    #5
    <?php if ( has_post_thumbnail()) : the_post_thumbnail(); 
    	elseif ($thumbnail = get_post_meta($post->ID, 'resim', true) != '') : ?>
    	<img src="<?php echo $thumbnail;?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" width="250" height="220" /> 
    <?php else : ?>
    	<img src="<?php bloginfo('template_url'); ?>/images/hgtucelcom.jpg" alt="<?php the_title(); ?>" />
    <?php endif; ?>
    bunu bi dener misiniz
  • 29-01-2014, 15:55:35
    #6
    metin_nn adlı üyeden alıntı: mesajı görüntüle
    timthumb varsa

    <?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() ?>" rel="bookmark"><img src="<?php bloginfo('template_url'); ?>/timthumb.php?src=<?php echo get_post_meta($post->ID, "resim", true); ?>&w=250&h=220&zc=1" alt="<?php the_title(); ?>" width="250" height="220" /></a>
    <?php } else { ?>
    <a title="<?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php bloginfo('template_url'); ?>/timthumb.php?src=<?php bloginfo('template_url'); ?>/images/hgtucelcom.jpg&w=250&h=220&zc=1" alt="<?php the_title(); ?>" width="250" height="220" /></a>
    <?php } ?>
    yoksa

    <?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() ?>" rel="bookmark"><img src="<?php echo get_post_meta($post->ID, "resim", true); ?>" alt="<?php the_title(); ?>" width="250" height="220" /></a>
    <?php } else { ?>
    <a title="<?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php bloginfo('template_url'); ?>/timthumb.php?src=<?php bloginfo('template_url'); ?>/images/hgtucelcom.jpg" alt="<?php the_title(); ?>" width="250" height="220" /></a>
    <?php } ?>
    şeklinde deneyin hocam.
    verdiğiniz kodları benimkileriyle değişitm başlıklar yerine oturuyor. bu sefer resimler çıkmıyor. bu araca timthumb nedir ? benim temada öyle dosya yok

    bakın böyle oluyor


    --R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 13:55:35 -->-> Daha önceki mesaj 13:53:22 --

    Ruwm adlı üyeden alıntı: mesajı görüntüle
    <?php if ( has_post_thumbnail()) : the_post_thumbnail(); 
    	elseif ($thumbnail = get_post_meta($post->ID, 'resim', true) != '') : ?>
    	<img src="<?php echo $thumbnail;?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" width="250" height="220" /> 
    <?php else : ?>
    	<img src="<?php bloginfo('template_url'); ?>/images/hgtucelcom.jpg" alt="<?php the_title(); ?>" />
    <?php endif; ?>
    bunu bi dener misiniz
    öne çıkarıolmış resimler geliyor ama resim yok resmi gelmiyor
  • 29-01-2014, 15:58:22
    #7
    Hocam temanızın içinde /images/hgtucelcom.jpg dizininde resim olduğuna emin misiniz.

    TimThumb bir çeşit resim boyutlandırma tekniğidir. Eklenti gerektirmeksizin görsele efect veya boyutlandırma işlemi yapmanızı sağlar. Detaylı bilgi için bknz
  • 29-01-2014, 16:04:07
    #8
    Ruwm adlı üyeden alıntı: mesajı görüntüle
    Hocam temanızın içinde /images/hgtucelcom.jpg dizininde resim olduğuna emin misiniz.

    TimThumb bir çeşit resim boyutlandırma tekniğidir. Eklenti gerektirmeksizin görsele efect veya boyutlandırma işlemi yapmanızı sağlar. Detaylı bilgi için bknz
    Evet hocam öyle bir resim var neden olmuyor acaba ?
  • 29-01-2014, 16:05:35
    #9
    PHP - WORDPRESS - YAZILIM
    Edit.