• 08-04-2010, 14:12:15
    #1
    arkadaşlar merhaba anasayfada özel alanlı resim ekledigimizde görünmüyor.
    çünkü index.php de thumbnail alanı yok bunu nasıl yapabiliriz acaba ?
  • 08-04-2010, 15:01:45
    #2
    özel alandan ekliyorsan customfield php kodu ile temaya kod entegrasyonu yapman lazım.
  • 08-04-2010, 15:34:14
    #3
    timthumb.php dosyasını temanızın içine atın.

    resmin gözükmesini istediğiniz yere de aşağıdaki kodu ekleyin ve temanıza göre ölçüleri düzenleyin. içeriklerine ekleyeceğini resim özel alanında resim yolu http ile başlayan tam adres olmalıdır.

    <img src="<?php bloginfo('url'); ?>/timthumb.php?src=<?php echo get_post_meta($post->ID, 'resim',true) ?>&amp;w=120&amp;h=80&amp;zc=1&amp;q=60" alt="<?php the_title(); ?>">
    w resmin genişliği - pixel olarak
    h resmin yüksekliği - pixel olarak
    q resmin kalitesi - varsayılan %75
  • 08-04-2010, 15:57:49
    #4
    ama index deki konu basan kod kısmı farklı kodlanmış oraya nasıl ekleyecegim ?

    konunun basıldıgı kod

    <!-- primary content -->
    <div id="primary-content">
    <div class="blocks">
    <?php do_action('mystique_before_primary'); ?>
    <?php
    if (have_posts()):
    while (have_posts()):
    the_post();
    mystique_post();
    endwhile;

    mystique_pagenavi();
    else: ?>
    <h1 class="title error"><?php _e("No posts found","mystique"); ?></h1>
    <p><?php _e("Sorry, but you are looking for something that isn't here.","mystique"); ?></p>

    <?php endif; ?>
    <?php do_action('mystique_after_primary'); ?>
    </div>
    </div>
    <!-- /primary content -->
  • 08-04-2010, 17:15:07
    #5
    pawliger adlı üyeden alıntı: mesajı görüntüle
    ama index deki konu basan kod kısmı farklı kodlanmış oraya nasıl ekleyecegim ?

    konunun basıldıgı kod

    <!-- primary content -->
    <div id="primary-content">
    <div class="blocks">
    <?php do_action('mystique_before_primary'); ?>
    <?php
    if (have_posts()):
    while (have_posts()):
    <img src="<?php bloginfo('url'); ?>/timthumb.php?src=<?php echo get_post_meta($post->ID, 'resim',true) ?>&amp;w=120&amp;h=80&amp;zc=1&amp;q=60" alt="<?php the_title(); ?>">
    the_post();
    mystique_post();
    endwhile;

    mystique_pagenavi();
    else: ?>
    <h1 class="title error"><?php _e("No posts found","mystique"); ?></h1>
    <p><?php _e("Sorry, but you are looking for something that isn't here.","mystique"); ?></p>

    <?php endif; ?>
    <?php do_action('mystique_after_primary'); ?>
    </div>
    </div>
    <!-- /primary content -->
    deneyin
    <!-- primary content -->
        <div id="primary-content">
         <div class="blocks">
          <?php do_action('mystique_before_primary'); ?>
          <?php
           if (have_posts()):
            while (have_posts()):
             the_post();
             mystique_post();
            endwhile;
    
            mystique_pagenavi();
           else: ?>
           <h1 class="title error"><?php _e("No posts found","mystique"); ?></h1>
           <p><?php _e("Sorry, but you are looking for something that isn't here.","mystique"); ?></p>
    
          <?php endif; ?>
          <?php do_action('mystique_after_primary'); ?>
         </div>
        </div>
        <!-- /primary content -->
  • 08-04-2010, 17:47:30
    #6
    malesef hata veriyor.

    Parse error: syntax error, unexpected '<' in /home/deneme/public_html/volkan/wp-content/themes/mystique/index.php on line 27
  • 08-04-2010, 19:01:16
    #7
    Kimlik doğrulama veya yönetimden onay bekliyor.
    burdaki yöntem %100 işe yaramakta kullanabilirsiniz
    https://www.r10.net/wordpress/492713-...turulur-2.html
  • 09-04-2010, 08:22:20
    #8
    pardon benim dikkatsizliğim. direkt php kodları içerisinde html etiketleri eklediğimiz için hata aldık. aşağıdaki şekilde resmin olduğu kısmı ayrımamız gerekiyordu. unutmadan, img class atıyarak biçimlendirmelisiniz.

    pawliger adlı üyeden alıntı: mesajı görüntüle
    malesef hata veriyor.

    Parse error: syntax error, unexpected '<' in /home/deneme/public_html/volkan/wp-content/themes/mystique/index.php on line 27
    <!-- primary content -->
    <div id="primary-content">
    <div class="blocks">
    <?php do_action('mystique_before_primary'); ?>
    <?php
    if (have_posts()):
    while (have_posts()):?>
    <img src="<?php bloginfo('url'); ?>/timthumb.php?src=<?php echo get_post_meta($post->ID, 'resim',true) ?>&amp;w=120&amp;h=80&amp;zc=1&amp;q=60" alt="<?php the_title(); ?>">
    <?php
    the_post();
    mystique_post();
    endwhile;
    
    mystique_pagenavi();
    else: ?>
    <h1 class="title error"><?php _e("No posts found","mystique"); ?></h1>
    <p><?php _e("Sorry, but you are looking for something that isn't here.","mystique"); ?></p>
    
    <?php endif; ?>
    <?php do_action('mystique_after_primary'); ?>
    </div>
    </div>
    <!-- /primary content -->