• 17-02-2010, 11:26:11
    #1
    category.php sayfamda 3 tane tablo var

    3 tabloda da post başlıklarını yazdırmak istiyorum.

    Yani ilk tablomda o kategoriye ait ilk 20 konum olacak sonraki tabloda 20 ile 40 arası konu başlıklarım olacak diğer tablomda 40 ile 60 arası konu başlıklarım olacak.

    Bunu nasıl yapabiliriz ?
  • 17-02-2010, 20:09:17
    #2
    Evet wp uzmanı arkadaşlardan yardım beklemekteyim
  • 17-02-2010, 21:25:51
    #3
    offset işler mi acep bunda bilmiyorum


    <div class="geneltablo">
    
    <div class="tablocan">
    <?php $recent = new WP_Query("showposts=20"); while($recent->have_posts()) : $recent->the_post();?>
    
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
        <?php endwhile; ?>
    </div>
    
    <div class="tablocan">
    
    <?php $recent = new WP_Query("showposts=20&offset=20"); while($recent->have_posts()) : $recent->the_post();?>
    
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
        <?php endwhile; ?>
    </div>
    
    <div class="tablocan">
    <?php $recent = new WP_Query("showposts=20&offset=40"); while($recent->have_posts()) : $recent->the_post();?>
    
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
        <?php endwhile; ?>
    </div>
    </div>
    .geneltablo
    {
    widht:750px;
    padding:0px;
    clear;both;
    }
    
    .tablocan
    {
    float:left;
    widht:250px;
    }
    css leri style.css ekle..diğerlerinide oraya ekle bi..ama bilmiyorum offset çalışır mı çalışmaz mı..
  • 18-02-2010, 14:22:25
    #4
    Tamam 3 tablo oldu ama 3 tabloda da aynı başlıklar sıralı ve tüm kategorilerdekini almış
  • 18-02-2010, 17:13:01
    #5
    showposts=20&offset=20

    yazan yerlerde

    showposts=20&cat=x şeklinde cat id gir

    offset işlemesi gerekti ama bilmiyorum..
  • 19-02-2010, 13:05:50
    #6
    Bunu category.php sayfasınıa yazacağım için o id otomatik alması gerek ama nasıl
  • 19-02-2010, 13:06:21
    #7
    if while döngüsüne sokucan..
  • 21-02-2010, 09:32:58
    #8
    İşte onu sen yapabilirsin