• 26-01-2008, 16:30:25
    #1
    merhaba arkadaşlar kurduğum temada ayarlayamadığım bir nokta var yardımcı olabirseniz sevinirim

    kod şu

    		<div id="homepageleft">		
    		
    			<div class="featured">
    				<?php $recent = new WP_Query("cat=1&showposts=1"); while($recent->have_posts()) : $recent->the_post();?>
    				<h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    				<?php the_content(__('Read the story &raquo;'));?><div style="clear:both;"></div>
    				<?php endwhile; ?>
    			</div>
    			
    			<div class="featured">
    				<?php $recent = new WP_Query("cat=1&showposts=2"); while($recent->have_posts()) : $recent->the_post();?>
    				<h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    				<?php the_content(__('Read the story &raquo;'));?><div style="clear:both;"></div>
    				<?php endwhile; ?>
    			</div>
    			
    			<div class="featured">
    				<?php $recent = new WP_Query("cat=1&showposts=3"); while($recent->have_posts()) : $recent->the_post();?>
    				<h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    				<?php the_content(__('Read the story &raquo;'));?><div style="clear:both;"></div>
    				<?php endwhile; ?>
    			</div>
    WP_Query("cat=1&showposts=1")
    şimdi burda kategori 1 deki ilk haberi göster diyor

    ben bunları silip en son eklenen haberleri çekmesini nasıl sağlayabilirim acaba ?
  • 27-01-2008, 02:54:31
    #2
    Kimlik doğrulama veya yönetimden onay bekliyor.
    <div id="homepageleft">

    <div class="featured">
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    <?php the_content(__('Read the story &raquo;'));?><div style="clear:both;"></div>
    <?php endwhile; ?>
    </div>

    sendeki tema kolonlu sanırım. tema bozulabilir.
  • 27-01-2008, 03:33:21
    #3
    hocam hallettim ben teşekkür ederim

    new WP_Query("cat=1&showposts=1")

    cat kısmına istediğim kategori id sini verdim showposts kısmını ise boş bıraktım son eklenenleri gösteriyor
  • 27-01-2008, 03:49:36
    #4
    Üyeliği durduruldu
    Sorunu halletmişsiniz ama ben yine de çok daha basit olan bir kod yazayım. Bunu sidebar.php'ye ekleyerek işinizi halledebilirsiniz. Rakamı istediğiniz sayıyla değiştirin.


    <ul><?php wp_get_archives('type=postbypost&limit=10'); ?></ul>
  • 27-01-2008, 04:44:19
    #5
    çok sağol hocam işe yarar gerçekten kaydedeyim hemen
  • 27-01-2008, 14:54:57
    #6
    Üyeliği durduruldu
    Rica ederim kardeşim, inşallah işine yarar.