• 25-09-2008, 07:16:32
    #1
    anasayfaya ve diger sayfalara(kategori ve tekil yazılar) ayrı sidebarlar yaptım... sidebarda bulundugumuz kategoride bulunan son yazıların cıkmasını istiyorum bir turlu yapamadım yardımcı olabilirseniz sevinirim arkadaslar ornek bi temada veriyorum...
    mimbopro
    edit: birde bu kodlarla yapabilirmiyiz diye dusunuyorum arkadaslar $recent değişgenine bulundugumuz kategorinin ID sini nasıl atıyabiliriz

    		<h3>Recent Posts</h3>
    
    			<ul>
    <?php
    		<?php query_posts('cat=$recent&showposts=5'); ?>
    		<?php while (have_posts()) : the_post(); ?>
    			<li><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></li>
    		<?php endwhile; ?>
    
    			</ul>
  • 25-09-2008, 17:39:58
    #2
    get_the_category_by_ID diye bir fonksiyon buldumda ne işe yarar bilmiyorum belki işine yarar
  • 25-09-2008, 18:15:27
    #3
    default temada şu kodu çalıştırmayı denedim, sonuç olumlu...
    			<li><h2>Kategorideki Son 5 yazı</h2>
    				<ul>
    <?php
    // Kategoriye göre listeleme
    $catname = single_cat_title("", false);
    $seems = new WP_Query('category_name='.$catname.'&showposts=4'); ?>
    <?php while ($seems->have_posts()) : $seems->the_post(); ?>
    <p class="son5"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></p>
    <?php endwhile; // Bu Kod Seems tarafından yazılmıştır. ?>
    				</ul>
    			</li>
  • 25-09-2008, 18:38:17
    #4
    hocam saolasın işe yaradı