• 11-12-2013, 13:36:51
    #1
    Üyeliği durduruldu
    merhaba arkadaşlar kullandığım bir php yazılımla ilgili (wp) ayrı bir ayar sayfasından parametre alarak kategori idlerinlerin belirlendiği bir kod var. kod idlerin dinamik olarak belirlenmesini sağlıyor. ancak ben direk kod kısmında manuel olarak kategori id vermek istiyorum vermek istediğim id no:5 syntaxa hakim olmadığımdan muhtemelen değiştirirken hata alıyorum. konuda bilgisi olanlar yardımcı olabilirmi
    kodlar:
    <h3><?php echo get_cat_name( fs_get_option("fs_uc1") ); ?></h3>
    <ul>
    <?php 			
    wp_reset_query();
    query_posts('showposts=5&cat='.fs_get_option("fs_uc1"));								
    while ( have_posts() ) : the_post(); 																
    ?>
    <li>
    <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    </li>
    <?php endwhile; ?>									
    </ul>
    <a href="<?php echo get_category_link( fs_get_option("fs_uc1") ); ?>" class="more">Tümü</a>
  • 12-12-2013, 00:28:12
    #2
    <h3><?php echo get_cat_name( 'KATEGORİID' ); ?></h3>
    <ul>
    <?php 			
    wp_reset_query();
    query_posts('showposts=5&cat=KATEGORİID');								
    while ( have_posts() ) : the_post(); 																
    ?>
    <li>
    <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    </li>
    <?php endwhile; ?>									
    </ul>
    <a href="<?php echo get_category_link( 'KATEGORİID' ); ?>" class="more">Tümü</a>
    şeklinde denermisin