• 31-10-2014, 00:59:19
    #1
     <?php
    
    											if ( has_post_thumbnail()) : 
    
    												the_post_thumbnail( 'list', array('class' => 'fl-right', 'alt' => ''.get_the_title().'', 'title' => ''.get_the_title().'' )); 
    
    											elseif (get_post_meta($post->ID, 'resim', true) != '') : 
    
    												echo '<img class="fl-right" src="'.get_post_meta($post->ID, 'resim', true).'" width="196" height="106" alt="'.get_the_title().'" />'; 
    
    											[B]else : 
    
    												echo '<img class="fl-right" src="'.fs_get_option('fs_logo').'" width="196" height="106" alt="'.get_the_title().'" />';
    
    											endif;[/B]
    
    										?>
    fs_get_option('fs_logo') tema tasarımcısı bu kod ile her resimi olmayan habere logoyu atamış. Ben bunu değiştirip her resim olmayan habere kendi belirleyeceğim resmi atamak istiyorum nasıl yapabilirim.
  • 31-10-2014, 01:06:32
    #2
    Aşağıdaki satırdaki site.com/resim.jpg olan yeri bir resim adresi girerek deneyin.

    <?php
     
                                    if ( has_post_thumbnail()) :
     
                                       the_post_thumbnail( 'list', array('class' => 'fl-right', 'alt' => ''.get_the_title().'', 'title' => ''.get_the_title().'' ));
     
                                    elseif (get_post_meta($post->ID, 'resim', true) != '') :
     
                                       echo '<img class="fl-right" src="'.get_post_meta($post->ID, 'resim', true).'" width="196" height="106" alt="'.get_the_title().'" />';
     
                                    <b>else : 
     
                                       echo '<img class="fl-right" src="http://www.site.com/resim.jpg" width="196" height="106" alt="'.get_the_title().'" />';
     
                                    endif;</b>
     
                                 ?>
  • 31-10-2014, 01:06:56
    #3
    eMRezgn adlı üyeden alıntı: mesajı görüntüle
     <?php
    
    											if ( has_post_thumbnail()) : 
    
    												the_post_thumbnail( 'list', array('class' => 'fl-right', 'alt' => ''.get_the_title().'', 'title' => ''.get_the_title().'' )); 
    
    											elseif (get_post_meta($post->ID, 'resim', true) != '') : 
    
    												echo '<img class="fl-right" src="'.get_post_meta($post->ID, 'resim', true).'" width="196" height="106" alt="'.get_the_title().'" />'; 
    
    											[B]else : 
    
    												echo '<img class="fl-right" src="'.fs_get_option('fs_logo').'" width="196" height="106" alt="'.get_the_title().'" />';
    
    											endif;[/B]
    
    										?>
    fs_get_option('fs_logo') tema tasarımcısı bu kod ile her resimi olmayan habere logoyu atamış. Ben bunu değiştirip her resim olmayan habere kendi belirleyeceğim resmi atamak istiyorum nasıl yapabilirim.
    Kendi belirlediğiniz resmi hazırlayıp eski görselin üzerine yazdırmayı denediniz mi?
  • 31-10-2014, 01:27:25
    #4
    buddhaben adlı üyeden alıntı: mesajı görüntüle
    Kendi belirlediğiniz resmi hazırlayıp eski görselin üzerine yazdırmayı denediniz mi?
    oda mantıklı ama 2 tarafta aynı yerden resmi çekiyor. hem logo hem haber resmi.

    --R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 01:27:25 -->-> Daha önceki mesaj 01:10:42 --

    ozgurland adlı üyeden alıntı: mesajı görüntüle
    Aşağıdaki satırdaki site.com/resim.jpg olan yeri bir resim adresi girerek deneyin.

    <?php
     
                                    if ( has_post_thumbnail()) :
     
                                       the_post_thumbnail( 'list', array('class' => 'fl-right', 'alt' => ''.get_the_title().'', 'title' => ''.get_the_title().'' ));
     
                                    elseif (get_post_meta($post->ID, 'resim', true) != '') :
     
                                       echo '<img class="fl-right" src="'.get_post_meta($post->ID, 'resim', true).'" width="196" height="106" alt="'.get_the_title().'" />';
     
                                    <b>else : 
     
                                       echo '<img class="fl-right" src="http://www.site.com/resim.jpg" width="196" height="106" alt="'.get_the_title().'" />';
     
                                    endif;</b>
     
                                 ?>
    dediğiniz gibi oldu ama bu o resmi tema içinden nasıl çağırabilirim. ../../img/haber.jpg
  • 31-10-2014, 11:12:12
    #5
    Gold üye
    <img class="fl-right" src="<?php bloginfo('template_url'); ?>/img/resim.jpg" width="196" height="106" alt="<?php the_title(); ?>" />
  • 01-11-2014, 00:25:49
    #6
    uckan adlı üyeden alıntı: mesajı görüntüle
    <img class="fl-right" src="<?php bloginfo('template_url'); ?>/img/resim.jpg" width="196" height="106" alt="<?php the_title(); ?>" />
    olmadı hata veriyor.Domain adresinde link verdim mecburen teşekkürler ilginizi için
  • 01-11-2014, 00:31:08
    #7
    Merhaba bu şekil yapabilirsiniz.

    <?php
     
                                    if ( has_post_thumbnail()) : 
     
                                       the_post_thumbnail( 'list', array('class' => 'fl-right', 'alt' => ''.get_the_title().'', 'title' => ''.get_the_title().'' )); 
     
                                    elseif (get_post_meta($post->ID, 'resim', true) != '') : 
     
                                       echo '<img class="fl-right" src="'.get_post_meta($post->ID, 'resim', true).'" width="196" height="106" alt="'.get_the_title().'" />'; 
     
                                    <b>else : 
     
                                       echo '<img class="fl-right" src="resimadresi" width="196" height="106" alt="'.get_the_title().'" />';
     
                                    endif;</b>
     
                                 ?>
    resimadresi dediğim yere yazının resmi yoksa çıkacak resmin urlsini giriniz.
  • 01-11-2014, 00:33:48
    #8
    http://site.com/wp-content/themes/tweaks/img/haber.jpg bu şekilde girdim oldu
  • 04-11-2014, 21:31:08
    #9
    teşekkürler