arkadaşlar merhaba anasayfada özel alanlı resim ekledigimizde görünmüyor.
çünkü index.php de thumbnail alanı yok bunu nasıl yapabiliriz acaba ?
Anasayfa sorunu
7
●659
- 08-04-2010, 15:01:45özel alandan ekliyorsan customfield php kodu ile temaya kod entegrasyonu yapman lazım.
- 08-04-2010, 15:34:14timthumb.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) ?>&w=120&h=80&zc=1&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:49ama 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:07deneyinpawliger adlı üyeden alıntı: mesajı görüntüle
<!-- 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, 19:01:16Kimlik 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:20pardon 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<!-- 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) ?>&w=120&h=80&zc=1&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 -->